API
4.0
For C++ developers
|
Public Member Functions | |
Exception (const std::string &aMsg="", const std::string &aFile="", int aLine=-1) | |
This constructor is for backward compatibility. More... | |
Exception (const std::string &file, size_t line, const std::string &func) | |
Call this constructor from derived classes to add file, line and function information to the error message. More... | |
Exception (const std::string &file, size_t line, const std::string &func, const std::string &msg) | |
Use this when you want to throw an Exception (with OPENSIM_THROW or OPENSIM_THROW_IF) and also provide a message. More... | |
Exception (const std::string &file, size_t line, const std::string &func, const Object &obj) | |
The message created by this constructor will contain the class name and instance name of the provided Object. More... | |
Exception (const std::string &file, size_t line, const std::string &func, const Object &obj, const std::string &msg) | |
The message created by this constructor will contain the class name and instance name of the provided Object, and also accepts a message. More... | |
Public Member Functions inherited from OpenSim::Exception | |
Exception (const std::string &aMsg="", const std::string &aFile="", int aLine=-1) | |
This constructor is for backward compatibility. More... | |
Exception (const std::string &file, size_t line, const std::string &func) | |
Call this constructor from derived classes to add file, line and function information to the error message. More... | |
Exception (const std::string &file, size_t line, const std::string &func, const std::string &msg) | |
Use this when you want to throw an Exception (with OPENSIM_THROW or OPENSIM_THROW_IF) and also provide a message. More... | |
Exception (const std::string &file, size_t line, const std::string &func, const Object &obj) | |
The message created by this constructor will contain the class name and instance name of the provided Object. More... | |
Exception (const std::string &file, size_t line, const std::string &func, const Object &obj, const std::string &msg) | |
The message created by this constructor will contain the class name and instance name of the provided Object, and also accepts a message. More... | |
virtual | ~Exception () throw () |
void | setMessage (const std::string &aMsg) |
const char * | getMessage () const |
virtual void | print (std::ostream &aOut) const |
const char * | what () const noexcept override |
Additional Inherited Members | |
Protected Member Functions inherited from OpenSim::Exception | |
void | addMessage (const std::string &msg) |
Add to the error message that will be returned for the exception. More... | |
Related Functions inherited from OpenSim::Exception | |
#define | OPENSIM_THROW(EXCEPTION, ...) throw EXCEPTION{__FILE__, __LINE__, __func__, __VA_ARGS__}; |
More... | |
#define | OPENSIM_THROW_IF(CONDITION, EXCEPTION, ...) |
This macro checks the given condition and throws the given exception if the condition is true. More... | |
OpenSim::Exception::Exception |
This constructor is for backward compatibility.
Use the constructor taking file, line, func.
OpenSim::Exception::Exception |
OpenSim::Exception::Exception |
The message created by this constructor will contain the class name and instance name of the provided Object.
Use this when throwing derived classes. Use OPENSIM_THROW_<> macros at throw sites.
OpenSim::Exception::Exception |
Use this when you want to throw an Exception (with OPENSIM_THROW or OPENSIM_THROW_IF) and also provide a message.
OpenSim::Exception::Exception |
Call this constructor from derived classes to add file, line and function information to the error message.
Use this when throwing Derived classes. Use OPENSIM_THROW_<> macros at throw sites.