Base class for all mockpp exceptions. More...
Public Member Functions | |
Exception (unsigned srcline, const char *srcfile, const String &message) | |
Constructs an exception. | |
virtual | ~Exception () throw () |
Destroys the exception. | |
virtual String | getMessage () const |
Returns the exception description. | |
unsigned | getSrcLine () const |
Returns the source line where the exception occured. | |
String | getSrcFile () const |
Returns the source file name where the exception occured. | |
virtual const char * | what () const throw () |
Returns the exception description. |
Base class for all mockpp exceptions.
The main purpose of such exceptions is to provide information about the location and the cause of failed actions.
Definition at line 45 of file Exception.h.
mockpp::Exception::Exception | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | message | |||
) |
Constructs an exception.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause |
Definition at line 39 of file Exception.cpp.
mockpp::Exception::~Exception | ( | ) | throw () [virtual] |
Destroys the exception.
Mainly here to enforce virtual destructors.
Definition at line 55 of file Exception.cpp.
String mockpp::Exception::getMessage | ( | ) | const [virtual] |
Returns the exception description.
Reimplemented in mockpp::DynamicChainingMockError< R, I >.
Definition at line 71 of file Exception.cpp.
String mockpp::Exception::getSrcFile | ( | ) | const |
Returns the source file name where the exception occured.
Definition at line 83 of file Exception.cpp.
unsigned mockpp::Exception::getSrcLine | ( | ) | const |
Returns the source line where the exception occured.
Definition at line 77 of file Exception.cpp.
const char * mockpp::Exception::what | ( | ) | const throw () [virtual] |
Returns the exception description.
Provided for compatibility with std::exception. If Unicode is activated you might get corrupt information if you are beyond latin1 characters.
Definition at line 62 of file Exception.cpp.