Java-like exception class. More...
#include <Exception.h>
Public Member Functions | |
Exception (const Exception &other) | |
Copy constructor. | |
Exception (const string &msg, const string &where) | |
Construct an exception. | |
Exception (const exception &orig, const string &where) | |
Construct an exception with a starting trace. | |
Exception (const exception &orig, const string &msg, const string &where) | |
Construct an exception with a starting trace. | |
void | addLocation (const string &where) |
Adds a location (method name) to the trace. | |
virtual const char * | what () const throw () |
Gets the error message. | |
virtual const char * | getTrace () const |
Gets the trace. | |
Protected Member Functions | |
Exception () | |
Message and trace initialized to NULL. | |
void | addTraceIfPossible (const exception &ex) |
Initializes with the specified exception's trace that it also an instance of a subclass of Exception. | |
Protected Attributes | |
char * | message |
Error message. | |
char * | trace |
Stack trace. |
Java-like exception class.
gridripper::Exception::Exception | ( | const string & | msg, | |
const string & | where | |||
) |
Construct an exception.
msg | error message | |
where | current location (method name) |
Reimplemented in gridripper::amr1d::InitCond::Exception.
gridripper::Exception::Exception | ( | const exception & | orig, | |
const string & | where | |||
) |
Construct an exception with a starting trace.
orig | original exception containing the source of the trace | |
where | current location (method name) |
Reimplemented in gridripper::amr1d::InitCond::Exception.
gridripper::Exception::Exception | ( | const exception & | orig, | |
const string & | msg, | |||
const string & | where | |||
) |
Construct an exception with a starting trace.
orig | original exception containing the source of the trace | |
msg | error message | |
where | current location (method name) |
Reimplemented in gridripper::amr1d::InitCond::Exception.
gridripper::Exception::Exception | ( | ) | [protected] |
Message and trace initialized to NULL.
void gridripper::Exception::addLocation | ( | const string & | where | ) |
Adds a location (method name) to the trace.
virtual const char* gridripper::Exception::getTrace | ( | ) | const [inline, virtual] |
Gets the trace.
virtual const char* gridripper::Exception::what | ( | ) | const throw () [inline, virtual] |
Gets the error message.
char* gridripper::Exception::message [protected] |
Error message.
char* gridripper::Exception::trace [protected] |
Stack trace.