The Sparta Modeling Framework
|
Used to construct and throw a standard C++ exception. Inherits from std::exception. More...
#include <SpartaException.hpp>
Public Member Functions | |
SpartaException () | |
Construct a SpartaException object with empty reason. | |
SpartaException (const std::string &reason) | |
Construct a SpartaException object. | |
SpartaException (const SpartaException &orig) | |
Copy construct a SpartaException object. | |
virtual | ~SpartaException () noexcept |
Destroy! | |
const char * | what () const noexcept |
Overload from std::exception. | |
std::string | backtrace () const noexcept |
Returns the backtrace at the time this exception was generated. | |
std::string | rawReason () const |
Return the raw reason without file, line information. | |
template<class T > | |
SpartaException & | operator<< (const T &msg) |
Append additional information to the message. | |
Used to construct and throw a standard C++ exception. Inherits from std::exception.
Definition at line 63 of file SpartaException.hpp.
sparta::SpartaException::SpartaException | ( | ) |
Construct a SpartaException object with empty reason.
Reason can be populated later with the insertion operator.
sparta::SpartaException::SpartaException | ( | const std::string & | reason | ) |
Construct a SpartaException object.
reason | The reason for the exception |
|
inline |
Append additional information to the message.
msg | The addition info |
Usage:
or you can do this:
but it's not as pretty.
Definition at line 134 of file SpartaException.hpp.
|
inline |
Return the raw reason without file, line information.
Definition at line 111 of file SpartaException.hpp.
|
inlinenoexcept |
Overload from std::exception.
Definition at line 97 of file SpartaException.hpp.