--- /dev/null
+//
+// Created by v.cherepanov on 28.03.18.
+//
+
+#ifndef __BASEEXCEPTION_H__
+#define __BASEEXCEPTION_H__
+
+#include <vector>
+#include <string>
+#include <ostream>
+
+namespace nncc
+{
+namespace foundation
+{
+
+class BaseException : public std::exception
+{
+public:
+ BaseException() = default;
+ ~BaseException() throw() override = default;
+
+ explicit BaseException(const std::string &info);
+ explicit BaseException(BaseException &e, const std::string &info);
+
+ BaseException &append(const std::string &info);
+ const std::vector<std::string> &getInfo() const;
+ const char *what() const throw() override;
+
+private:
+ std::vector<std::string> _info;
+};
+
+std::ostream &operator<<(std::ostream &s, const BaseException &e);
+
+} // namespace foundation
+} // namespace nncc
+
+#endif // __BASEEXCEPTION_H__
--- /dev/null
+#include <exception/BaseException.h>
+
+#include <gtest/gtest.h>
+
+using namespace nncc::foundation;
+
+std::string errorMsg1 = "error constructor";
+std::string errorMsg2 = "error append";
+std::string errorMsg3 = "error second constructor";
+
+std::vector<std::string> msgs = {errorMsg1, errorMsg2, errorMsg3};
+
+void err1() { throw BaseException(errorMsg1); }
+
+void err2()
+{
+ try
+ {
+ err1();
+ }
+ catch (BaseException &e)
+ {
+ throw e.append(errorMsg2);
+ }
+}
+
+void err3()
+{
+ try
+ {
+ err2();
+ }
+ catch (BaseException &e)
+ {
+ throw BaseException(e, errorMsg3);
+ }
+}
+
+TEST(FOUNDATION_EXCEPTION, BaseException)
+{
+ try
+ {
+ err3();
+ }
+ catch (BaseException &e)
+ {
+ ASSERT_TRUE(msgs == e.getInfo());
+ return;
+ }
+
+ // should not be happened
+ ASSERT_TRUE(false);
+}
--- /dev/null
+//
+// Created by v.cherepanov@samsung.com on 28.03.18.
+//
+
+#include <string>
+#include <iostream>
+#include <stdexcept>
+
+#include "exception/BaseException.h"
+
+namespace nncc
+{
+namespace foundation
+{
+
+BaseException::BaseException(const std::string &info) { _info.push_back(info); }
+
+BaseException::BaseException(BaseException &e, const std::string &info)
+{
+ for (auto errors : e.getInfo())
+ {
+ _info.push_back(errors);
+ }
+ _info.push_back(info);
+}
+
+const char *BaseException::what() const throw()
+{
+ // TODO implement it
+ throw std::runtime_error{"Not implemented, yet"};
+}
+
+const std::vector<std::string> &BaseException::getInfo() const { return _info; }
+
+BaseException &BaseException::append(const std::string &info)
+{
+ _info.push_back(info);
+ return *this;
+}
+
+std::ostream &operator<<(std::ostream &s, const BaseException &e)
+{
+ for (auto &errors : e.getInfo())
+ {
+ s << errors << std::endl;
+ }
+ return s;
+}
+
+} // namespace foundation
+} // namespace nncc