foundation nnc config exception (#204)
authorVitaliy Cherepanov/SRR-AI Tools Lab/./삼성전자 <v.cherepanov@samsung.com>
Wed, 16 May 2018 10:35:19 +0000 (13:35 +0300)
committer박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 16 May 2018 10:35:19 +0000 (19:35 +0900)
* 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 <v.cherepanov@samsung.com>
* core: Create base exception classes

move libs/core/.../plugin to libs/foundation/.../plugin

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* foundation: Create base exception classe

split class methods realisation

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* foundation: Create base exception class

fix format coding style

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* foundation: Create base exception class

this commit to fix PR

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* foundation: Create config exception class

This class will be used to signalize about some configuration errors
like bad parametrs

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* foundation: Create config exception class

Fix build for gcc compiler

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* foundation: Create config exception class

move config exception to contrib

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* foundation: Create config exception class

fix build. Add linking with nncc_foundation

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* nnc: Create config exception class

change namespace to nncc::contrib::

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* nnc: Create config exception class

This commit to fix coding style

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
* nnc: Create config exception class

This commit to fix coding style

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
contrib/nnc/CMakeLists.txt
contrib/nnc/include/exception/ConfigException.h [new file with mode: 0644]
contrib/nnc/src/exception/ConfigException.cpp [new file with mode: 0644]

index 8e79103..aea34cd 100644 (file)
@@ -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 (file)
index 0000000..ca1be44
--- /dev/null
@@ -0,0 +1,29 @@
+//
+// Created by snusmumric on 04.05.18.
+//
+#ifndef __CONFIGEXCEPTION_H__
+#define __CONFIGEXCEPTION_H__
+
+#include <string>
+
+#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 (file)
index 0000000..feb1154
--- /dev/null
@@ -0,0 +1,21 @@
+//
+// Created by snusmumric on 04.05.18.
+//
+
+#include <string>
+
+#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