7 #ifndef EXCEPTION_SIMBODY_H 8 #define EXCEPTION_SIMBODY_H 12 #include "base_data_package.h" 39 Exception(
const std::string &aMsg=
"",
const std::string &aFile=
"",
int aLine=-1);
46 Exception(
const std::string& file,
size_t line,
const std::string& func);
50 Exception(
const std::string& file,
size_t line,
51 const std::string& func,
const std::string& msg);
65 void setMessage(
const std::string &aMsg);
66 const char* getMessage()
const;
68 virtual void print(std::ostream &aOut)
const;
70 const char* what() const noexcept override;
77 const std::string& func,
78 const std::string& msg =
"") :
80 std::string mesg =
"Invalid Argument. " + msg;
90 const std::string& func,
91 const std::string& msg =
"") :
93 std::string mesg =
"Invalid Call. " + msg;
103 const std::string& func,
104 const std::string& msg) :
106 std::string mesg =
"Invalid Template argument. " + msg;
116 const std::string& func,
121 std::string msg =
"min = " + std::to_string(min);
122 msg +=
" max = " + std::to_string(max);
123 msg +=
" index = " + std::to_string(index);
133 const std::string& func,
134 const std::string& key) :
136 std::string msg =
"Key '" + key +
"' not found.";
142 #endif //EXCEPTION_SIMBODY_H Definition: exception.h:73
Definition: exception.h:86
Definition: exception.h:99
Exception(const std::string &aMsg="", const std::string &aFile="", int aLine=-1)
Default Constructor.
Definition: exception.cpp:9
Definition: exception.h:112
virtual ~Exception()
Definition: exception.h:55
void addMessage(const std::string &msg)
Definition: exception.cpp:42
A class for basic exception functionality.
Definition: exception.h:28
Definition: exception.h:129
Definition: solid_body_supplementary.cpp:9