[Util] Add gtest style throw macro
authorJihoon Lee <jhoon.it.lee@samsung.com>
Wed, 27 Jan 2021 05:32:33 +0000 (14:32 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Wed, 17 Feb 2021 03:47:30 +0000 (12:47 +0900)
commitd76932af5bbd7280aed827ce5cfea7a530b896e6
treee8d5a8c0e86037f5a484c09b606a6f9d32e3a15d
parent3390b57c7c16e0769b71358f356d3392d7f398fd
[Util] Add gtest style throw macro

Add gtest style throw macro for productivity.
With this patch, if you have to throw, do in one line

`NNTR_THROW_IF(true, std::invalid_argument) << log << what << ever`

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
nntrainer/nntrainer_error.h
test/unittest/unittest_nntrainer_internal.cpp