![]() |
NDEVR
API Documentation
|
Manages crash handling, exception reporting, and mini-dump creation. More...
Public Member Functions | |
| CrashManager () | |
| Constructs a CrashManager with default settings. | |
| virtual | ~CrashManager () |
| Destroys the CrashManager and cleans up any registered handlers. | |
| bool | handleException (void *e) |
| Handles a platform-specific exception, potentially writing a crash report or mini-dump. | |
| bool | recordAllExceptions () const |
| Returns whether all exceptions should be recorded. | |
| bool | setAsTopLevelExceptionHandler () |
| Registers this CrashManager as the top-level unhandled exception handler for the process. | |
| void | setCallback (std::function< void(const Exception &)> callback) |
| Sets a callback function to be invoked when an exception is caught. | |
| void | setMiniDumpDirectory (const File &file) |
| Sets the directory where mini-dump files will be written on crash. | |
Static Public Member Functions | |
| static CrashManager * | CurrentCrashManager () |
| Retrieves the currently active CrashManager instance. | |
Protected Attributes | |
| std::function< void(const Exception &)> | m_callback |
| Callback invoked when an exception is caught. | |
| File | m_minidump_directory |
| Directory where mini-dump files are written on crash. | |
Manages crash handling, exception reporting, and mini-dump creation.
Definition at line 45 of file CrashManager.h.
|
static |
Retrieves the currently active CrashManager instance.
References CrashManager().
| bool CrashManager::handleException | ( | void * | e | ) |
Handles a platform-specific exception, potentially writing a crash report or mini-dump.
| [in] | e | A pointer to the platform-specific exception record (e.g., EXCEPTION_POINTERS on Windows). |
|
inline |
Returns whether all exceptions should be recorded.
Definition at line 68 of file CrashManager.h.
| bool CrashManager::setAsTopLevelExceptionHandler | ( | ) |
Registers this CrashManager as the top-level unhandled exception handler for the process.
|
inline |
Sets a callback function to be invoked when an exception is caught.
| [in] | callback | The function to call with the caught Exception. |
Definition at line 84 of file CrashManager.h.
References m_callback.
|
inline |
Sets the directory where mini-dump files will be written on crash.
| [in] | file | The directory path for mini-dump output. |
Definition at line 90 of file CrashManager.h.
References file, and m_minidump_directory.