#include <iError.h>
Inheritance diagram for iERR::iErrorHandler::
Public Methods | |
iErrorHandler () | |
constructor. More... | |
virtual | ~iErrorHandler () |
destructor. More... | |
virtual int | Throw (iError::ErrorLevel errLevel, const char *functionName, const char *file, int line, iErrorCode *errCode,...) |
Use this method to create error and evtl to throw it as C++ exception. More... | |
virtual bool | Rethrow (const char *functionName=NULL, const char *file=NULL, int line=0) |
Use this method to propagate the error or use iRethrow macro to call Rethrow of the current error handler. More... | |
virtual bool | Handle (const char *functionName=NULL, const char *file=NULL, int line=0) |
Display the last error occured, write it to a log file or whatever the error handler desires to do with it. More... | |
virtual bool | Reset () |
Use this method to reset the last error, so iLastError will return NULL. More... | |
virtual iError * | LastError (bool reset=false) |
Returns the last error occured. More... | |
iErrorHandler * | SetCurrent () |
Set this error handler to be the current error handler. More... | |
Static Public Methods | |
iErrorHandler * | Current () |
Get the current error handler. More... | |
Protected Methods | |
virtual void | _Throw ()=0 |
overload this method to provide customized error throwing. More... | |
virtual void | _Handle ()=0 |
overload this method to provide customized error handling. More... | |
Protected Attributes | |
iError * | m_Last |
@label pointer to m_LastError or NULL. More... | |
Private Attributes | |
iError * | m_LastError |
The error handlers own iError instance @label m_LastError. More... | |
Static Private Attributes | |
int | m_HandlerCount = 0 |
Used for thread local storage initialisation. More... | |
Friends | |
class | iError |
To handle an error use an instance of the concrete error handler or the current error handler (iErrorHandler::Current). Use iThrow macro to do it automaticly
Definition at line 410 of file iError.h.
|
constructor.
Definition at line 62 of file iError.cpp. References iError, m_HandlerCount, and m_LastError. Referenced by Current(), and SetCurrent(). |
|
destructor.
Definition at line 81 of file iError.cpp. References m_HandlerCount, and m_LastError. |
|
overload this method to provide customized error handling.
Reimplemented in iERR::iStdErrorHandler. Referenced by Handle(). |
|
overload this method to provide customized error throwing.
Reimplemented in iERR::iStdErrorHandler. |
|
Get the current error handler.
Definition at line 242 of file iError.cpp. References iErrorHandler(). |
|
Display the last error occured, write it to a log file or whatever the error handler desires to do with it. If HERE macro is used as parameter, the debug information of the error is replaced with the file name and line number of the caller.
Definition at line 194 of file iError.cpp. References _Handle(), and m_Last. Referenced by iERR::iStdErrorHandler::_Throw(). |
|
Returns the last error occured.
Definition at line 233 of file iError.cpp. References iError, m_Last, and Reset(). Referenced by iERR::iStdErrorHandler::_Throw(). |
|
Use this method to reset the last error, so iLastError will return NULL.
Definition at line 220 of file iError.cpp. References m_Last. Referenced by LastError(). |
|
Use this method to propagate the error or use iRethrow macro to call Rethrow of the current error handler. If HERE macro is used as parameter, the debug information of the error is replaced with the file name and line number of the caller.
Definition at line 169 of file iError.cpp. |
|
Set this error handler to be the current error handler.
Definition at line 277 of file iError.cpp. References iErrorHandler(). |
|
Use this method to create error and evtl to throw it as C++ exception. Or use iThrow macro to call Throw of the current error handler. Use INFO, WARNING, CRITICAL or EXCEPTION macros instead of specifying parameters The default error handler will only throw the error as C++ exception if the error level is iEXCEPTION. Use Handle() to display the last error or whatever the error handler will do with it.
Definition at line 99 of file iError.cpp. References _Throw(), m_Last, and m_LastError. |
|
Definition at line 413 of file iError.h. Referenced by iErrorHandler(), and LastError(). |
|
Used for thread local storage initialisation.
Definition at line 46 of file iError.cpp. Referenced by iErrorHandler(), and ~iErrorHandler(). |
|
@label pointer to m_LastError or NULL.
Definition at line 528 of file iError.h. Referenced by iERR::iStdErrorHandler::_Handle(), iERR::iStdErrorHandler::_Throw(), Handle(), LastError(), Reset(), Rethrow(), and Throw(). |
|
The error handlers own iError instance @label m_LastError.
Definition at line 536 of file iError.h. Referenced by iErrorHandler(), Throw(), and ~iErrorHandler(). |