From: Vitaliy Cherepanov/SRR-AI Tools Lab/./삼성전자 Date: Wed, 16 May 2018 10:35:19 +0000 (+0300) Subject: foundation nnc config exception (#204) X-Git-Tag: nncc_backup~2690 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71bbaa2f88873f9f06686983e48e9cc4910850d4;p=platform%2Fcore%2Fml%2Fnnfw.git foundation nnc config exception (#204) * Core: Create base exception classes Created base exceptions classes. This classes will be used by compiler components like frontend, optimizers, backend to inform main compiler part about some problems during compilation Signed-off-by: Vitaliy Cherepanov * core: Create base exception classes move libs/core/.../plugin to libs/foundation/.../plugin Signed-off-by: Vitaliy Cherepanov * foundation: Create base exception classe split class methods realisation Signed-off-by: Vitaliy Cherepanov * foundation: Create base exception class fix format coding style Signed-off-by: Vitaliy Cherepanov * foundation: Create base exception class this commit to fix PR Signed-off-by: Vitaliy Cherepanov * foundation: Create config exception class This class will be used to signalize about some configuration errors like bad parametrs Signed-off-by: Vitaliy Cherepanov * foundation: Create config exception class Fix build for gcc compiler Signed-off-by: Vitaliy Cherepanov * foundation: Create config exception class move config exception to contrib Signed-off-by: Vitaliy Cherepanov * foundation: Create config exception class fix build. Add linking with nncc_foundation Signed-off-by: Vitaliy Cherepanov * nnc: Create config exception class change namespace to nncc::contrib:: Signed-off-by: Vitaliy Cherepanov * nnc: Create config exception class This commit to fix coding style Signed-off-by: Vitaliy Cherepanov * nnc: Create config exception class This commit to fix coding style Signed-off-by: Vitaliy Cherepanov --- diff --git a/contrib/nnc/CMakeLists.txt b/contrib/nnc/CMakeLists.txt index 8e79103..aea34cd 100644 --- a/contrib/nnc/CMakeLists.txt +++ b/contrib/nnc/CMakeLists.txt @@ -4,6 +4,7 @@ file(GLOB_RECURSE CL_SRC src/*.cpp include/*.h) add_executable(nnc ${CL_SRC}) target_link_libraries(nnc PRIVATE nncc_core) +target_link_libraries(nnc PRIVATE nncc_foundation) target_include_directories(nnc PUBLIC include) add_subdirectory(libs) diff --git a/contrib/nnc/include/exception/ConfigException.h b/contrib/nnc/include/exception/ConfigException.h new file mode 100644 index 0000000..ca1be44 --- /dev/null +++ b/contrib/nnc/include/exception/ConfigException.h @@ -0,0 +1,29 @@ +// +// Created by snusmumric on 04.05.18. +// +#ifndef __CONFIGEXCEPTION_H__ +#define __CONFIGEXCEPTION_H__ + +#include + +#include "exception/BaseException.h" + +namespace nncc +{ +namespace contrib +{ + +class ConfigException : public nncc::foundation::BaseException +{ +public: + ConfigException() = default; + ~ConfigException() throw() override = default; + + explicit ConfigException(const std::string &info); + explicit ConfigException(BaseException &e, const std::string &info); +}; + +} // namespace contrib +} // namespace nncc + +#endif // __CONFIGEXCEPTION_H__ diff --git a/contrib/nnc/src/exception/ConfigException.cpp b/contrib/nnc/src/exception/ConfigException.cpp new file mode 100644 index 0000000..feb1154 --- /dev/null +++ b/contrib/nnc/src/exception/ConfigException.cpp @@ -0,0 +1,21 @@ +// +// Created by snusmumric on 04.05.18. +// + +#include + +#include "exception/ConfigException.h" + +namespace nncc +{ +namespace contrib +{ + +ConfigException::ConfigException(const std::string &info) : BaseException(info) {} + +ConfigException::ConfigException(BaseException &e, const std::string &info) : BaseException(e, info) +{ +} + +} // namespace contrib +} // namespace nncc