strusBase
0.17
|
Interface for reporting and catching errors in modules. More...
#include <errorBufferInterface.hpp>
Public Types | |
enum | ErrorClass { None, RuntimeError, BadAlloc } |
Public Member Functions | |
virtual | ~ErrorBufferInterface () |
Destructor. More... | |
virtual void | setLogFile (FILE *hnd)=0 |
Define error log file. More... | |
virtual bool | setMaxNofThreads (unsigned int maxNofThreads)=0 |
Redefine the maximum number of threads using the error buffer. More... | |
virtual void | report (int errorcode, const char *format,...)=0 |
Report an error. More... | |
virtual void | explain (const char *format)=0 |
Report an error, overwriting the previous error. More... | |
virtual const char * | fetchError ()=0 |
Check, if an error has occurred and return it. More... | |
virtual bool | hasError () const =0 |
Check, if an error has occurred. More... | |
virtual void | allocContext ()=0 |
Allocate context for current thread. More... | |
virtual void | releaseContext ()=0 |
Dellocate context for current thread. More... | |
virtual DebugTraceInterface * | debugTrace () const =0 |
Fetches the debug trace interface if defined. More... | |
Interface for reporting and catching errors in modules.
|
inlinevirtual |
Destructor.
|
pure virtual |
Allocate context for current thread.
Implemented in strus::LocalErrorBuffer.
|
pure virtual |
Fetches the debug trace interface if defined.
Implemented in strus::LocalErrorBuffer.
|
pure virtual |
Report an error, overwriting the previous error.
[in] | format | error message format string |
Implemented in strus::LocalErrorBuffer.
|
pure virtual |
Check, if an error has occurred and return it.
Implemented in strus::LocalErrorBuffer.
|
pure virtual |
Check, if an error has occurred.
Implemented in strus::LocalErrorBuffer.
|
pure virtual |
Dellocate context for current thread.
Implemented in strus::LocalErrorBuffer.
|
pure virtual |
Report an error.
[in] | errorcode | error code of the error (errno and beyond) |
[in] | format | error message format string |
Implemented in strus::LocalErrorBuffer.
|
pure virtual |
Define error log file.
[in] | hnd | file handle to set as log file |
Implemented in strus::LocalErrorBuffer.
|
pure virtual |
Redefine the maximum number of threads using the error buffer.
[in] | maxNofThreads | number of threads |
Implemented in strus::LocalErrorBuffer.