ErrLib
|
#include <ErrLib_CPP.h>
Public Member Functions | |
Exception () | |
Exception (const std::wstring &message) | |
Exception (const std::wstring &message, DWORD code, void *data) | |
std::wstring | GetMsg () |
DWORD | GetCode () |
void * | GetData () |
void | GetMessageText (WCHAR *pOutput, int cch) |
void | GetContext (CONTEXT *pOutput) |
void | PrintStackTrace (WCHAR *pOutput, int cch) |
std::wstring | PrintStackTrace () |
void | Log (bool visible) |
Provides a base class for C++ exceptions that supports capturing a stack trace in the moment when exception is thrown and logging the exception information.
|
inline |
Creates a new exception using the default empty error message
|
inline |
Creates a new exception using the specified error message
|
inline |
Creates a new exception using the specified error message, error code and additional data
|
inline |
Gets the error code associated with this exception
|
inline |
Gets the processor context in the moment this exception was thrown
pOutput | The pointer to the caller-allocated buffer to store the CONTEXT structure. Must be at least sizeof(CONTEXT) bytes. |
|
inline |
Gets the additional user-defined data associated with this exception
|
inline |
Gets the error message associated with this exception as a C wide-character string
pOutput | The pointer to the caller-allocated wide character array that will be filled with error message text on output. |
cch | The maximum amount of characters that can be put into the array pointed by pOutput parameter. |
|
inline |
Gets the error message associated with this exception as a C++ wstring
|
inline |
Outputs the exception information into configured log targets
visible | Pass true if you want to use ERRLIB_OUTPUT_STDERR/ERRLIB_OUTPUT_MBOX logging targets (if they are enabled by configuration flags), false otherwise This method outputs information into one or more logging targets, configured using ErrLib_SetParameter function. It only outputs information into the stderr stream and message box if the visible parameter is true (and if respective flags are enabled). By default, the enabled logging targets are log file and stderr stream. |
|
inline |
Gets the stack trace in the moment this exception was thrown as a C++ wstring
|
inline |
Gets the stack trace in the moment this exception was thrown as a C wide-character string
pOutput | The pointer to the caller-allocated wide character array that will be filled with stack trace text on output. |
cch | The maximum amount of characters that can be put into the array pointed by pOutput parameter. |