#include <daeErrorHandler.h>
Public Member Functions | |
daeErrorHandler () | |
virtual void | handleError (daeString msg)=0 |
virtual void | handleWarning (daeString msg)=0 |
virtual | ~daeErrorHandler () |
Static Public Member Functions | |
static daeErrorHandler * | get () |
static void | setErrorHandler (daeErrorHandler *eh) |
Static Private Attributes | |
static std::auto_ptr < daeErrorHandler > | _defaultInstance |
static daeErrorHandler * | _instance |
The daeErrorHandler
class is a plugin that allows the use to overwrite how error and warning messages get handled in the client application. An example of this would be a class that reports the message to a gui front end instead of just printing on stdout.
Definition at line 20 of file daeErrorHandler.h.
daeErrorHandler::daeErrorHandler | ( | ) |
Constructor.
virtual daeErrorHandler::~daeErrorHandler | ( | ) | [virtual] |
Destructor.
static daeErrorHandler* daeErrorHandler::get | ( | ) | [static] |
Returns the current daeErrorHandlerPlugin. A program has one globally-accessible daeErrorHandler active at a time.
virtual void daeErrorHandler::handleError | ( | daeString | msg | ) | [pure virtual] |
This function is called when there is an error and a string needs to be sent to the user. You must overwrite this function in your plugin.
msg | Error message. |
Implemented in stdErrPlugin, and quietErrorHandler.
virtual void daeErrorHandler::handleWarning | ( | daeString | msg | ) | [pure virtual] |
This function is called when there is a warning and a string needs to be sent to the user. You must overwrite this function in your plugin.
msg | Warning message. |
Implemented in stdErrPlugin, and quietErrorHandler.
static void daeErrorHandler::setErrorHandler | ( | daeErrorHandler * | eh | ) | [static] |
Sets the daeErrorHandler to the one specified.
eh | The new daeErrorHandler to use. Passing in NULL results in the default plugin being used. |
std::auto_ptr<daeErrorHandler> daeErrorHandler::_defaultInstance [static, private] |
Definition at line 58 of file daeErrorHandler.h.
daeErrorHandler* daeErrorHandler::_instance [static, private] |
Definition at line 57 of file daeErrorHandler.h.