#include <mimotera++/MimoteraException.hh>
Inherited by Mimotera::EventNotReady, Mimotera::FileException, and Mimotera::MarkerPixelException.
Public Member Functions | |
| MimoteraException (const std::string &msg) | |
| Default constructor with message parameter. | |
| const char * | what () const throw () |
| Overload of the what method. | |
| const MimoteraException & | setLocation (const std::string &file="", unsigned line=0, const std::string &func="") const |
| Set location method. | |
| virtual | ~MimoteraException () throw () |
| Destructor. | |
Protected Attributes | |
| std::string | m_msg |
| The message! | |
All Mimotera++ exceptions are inheriting from this base class.
To simplify the definition and the use of exception within the API framework four pre-processor macros have been defined:
MIMOTERA_THROW( message ) to throw a generic Mimotera::MimoteraException with the message MIMOTERA_THROWX( exception, message ) to throw a particular exception using the message.MIMOTERA_EXCEPTION( name ) to define a new exception called name inheriting from Mimotera::MimoteraExceptionMIMOTERA_EXCEPTIONX( name, base ) to define a new exception called name and inheriting from base. base has to derived from Mimotera::MimoteraException.
Definition at line 119 of file MimoteraException.hh.
| Mimotera::MimoteraException::MimoteraException | ( | const std::string & | msg | ) |
Default constructor with message parameter.
This is the base class for all the exceptions used by the Mimotera API.
| msg | The message to print out. |
Definition at line 28 of file MimoteraException.cc.
| virtual Mimotera::MimoteraException::~MimoteraException | ( | ) | throw () [inline, virtual] |
| const MimoteraException & Mimotera::MimoteraException::setLocation | ( | const std::string & | file = "", |
|
| unsigned | line = 0, |
|||
| const std::string & | func = "" | |||
| ) | const |
Set location method.
This method is used to define where (file name and line) the exception was thrown.
Definition at line 32 of file MimoteraException.cc.
| const char* Mimotera::MimoteraException::what | ( | ) | const throw () [inline] |
std::string Mimotera::MimoteraException::m_msg [protected] |
1.5.7.1