exception.h
Go to the documentation of this file.
1 #ifndef DNAI_EXECPTIONS_EXCEPTION_H
2 #define DNAI_EXECPTIONS_EXCEPTION_H
3 #include <stdexcept>
4 
5 namespace dnai
6 {
7  namespace exceptions
8  {
12  class Exception : public std::runtime_error
13  {
14  public:
15  explicit Exception(const std::string& _Message, const std::string& from = "")
16  : runtime_error("DNAI Exception " + (!from.empty() ? "from (" + from + ") :" : ":") + _Message)
17  {
18  }
19  ~Exception() override = default;
20  };
21  }
22 }
23 
24 #endif //DNAI_EXECPTIONS_EXCEPTION_H
~Exception() override=default
Exception(const std::string &_Message, const std::string &from="")
Definition: exception.h:15
Base class for DNAI Exception.
Definition: exception.h:12
Definition: api.h:13