The cExceptionHandler class provides static methods for registration and unregistration of a exception handler for unhandled exceptions.
More...
#include <exceptionhandler.h>
The cExceptionHandler class provides static methods for registration and unregistration of a exception handler for unhandled exceptions.
Definition at line 20 of file exceptionhandler.h.
◆ fnAdditionalAction
typedef tVoid(* fnAdditionalAction) (const tChar *strBaseName, tBool bAskUser) |
Type for additional actions when an exception occurs.
Definition at line 24 of file exceptionhandler.h.
◆ CopyCallStack()
Copies the call stack.
- Parameters
-
[in] | sStack | The stack to copy. |
- Returns
- The copy of the stack.
◆ FreeCallStack()
Releases resources obtained through a GetCallStack call.
- Parameters
-
[in] | sStack | The stack retrieved from GetCallStack. |
- Returns
- tVoid
◆ GetCallStack() [1/2]
Returns the call stack.
- Parameters
-
strCallStack | [out] Will contain the call stack. |
nDepth | [in] The depth of the call stack to return. |
- Returns
- tTrue on success, otherwise tFalse.
◆ GetCallStack() [2/2]
Retrieve the current call stack trace.
- Parameters
-
[in] | nDepth | The maximum amount of stack frames to capture. |
[in] | pBuffer | for internal use only. |
- Returns
- The current call stack trace.
◆ RegisterExceptionHandler()
static tBool RegisterExceptionHandler |
( |
const tChar * | strApplicationName, |
|
|
const tChar * | strSupportContact, |
|
|
tBool | bDontAsk = tFalse ) |
|
static |
Registers the exception handler.
- Parameters
-
strApplicationName | [in] The name of the application. |
strSupportContact | [in] The support contact information (email). |
bDontAsk | [in] Whether or not the user can cancel the dump file creation (Windows only). |
- Returns
- tTrue on success, otherwise tFalse.
References tFalse.
◆ ResolveCallStack()
This will resolve symbol information from a stack trace.
- Parameters
-
[in] | pCallback | This will be called for each stack frame. |
[in] | sStack | A stack trace retrieved via GetCallStack. |
- Returns
- The result from the callback.
◆ SetAdditionalAction()
Registers an additional handler that is called when a crash occurs.
- Parameters
-
pAction | Pointer to the new additional handler. |
- Returns
- Pointer to the old additional handler (nullptr most of the time).
◆ UnregisterExceptionHandler()
static tBool UnregisterExceptionHandler |
( |
| ) |
|
|
static |
Unregisters the exception handler;.
- Returns
- tTrue on success, otherwise tFalse.