34#include <NDEVR/Exception.h>
35#include <NDEVR/SoftwareService.h>
36#include <NDEVR/File.h>
Manages crash handling, exception reporting, and mini-dump creation.
CrashManager()
Constructs a CrashManager with default settings.
bool handleException(void *e)
Handles a platform-specific exception, potentially writing a crash report or mini-dump.
File m_minidump_directory
Directory where mini-dump files are written on crash.
bool setAsTopLevelExceptionHandler()
Registers this CrashManager as the top-level unhandled exception handler for the process.
static CrashManager * CurrentCrashManager()
Retrieves the currently active CrashManager instance.
void setMiniDumpDirectory(const File &file)
Sets the directory where mini-dump files will be written on crash.
virtual ~CrashManager()
Destroys the CrashManager and cleans up any registered handlers.
void setCallback(std::function< void(const Exception &)> callback)
Sets a callback function to be invoked when an exception is caught.
bool recordAllExceptions() const
Returns whether all exceptions should be recorded.
std::function< void(const Exception &)> m_callback
Callback invoked when an exception is caught.
Provides consistent interface to handle errors through the throw expression.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Software Service Managers take a Software service to modify the behavior of the software.
Base interface for services that extend or modify software behavior through modules.
The primary namespace for the NDEVR SDK.
CrashManager * g_crash_manager
Global pointer to the active CrashManager instance.
@ file
The source file path associated with this object.