class
CrashHandler
Saves crash data and notifies the user when a crash occurs.
Public
Constructors
CrashHandler
Methods
~CrashHandler
staticStartUp
Constructs and starts the module.
staticShutDown
Shuts down this module and frees any resources it is using.
ReportCrash
Records a crash with a custom error message.
- type
- Type of the crash that occurred. For example "InvalidParameter".
- description
- More detailed description of the issue that caused the crash.
- function
- Optional name of the function where the error occurred.
- file
- Optional name of the source code file in which the code that crashed the program exists.
- line
- Optional source code line at which the crash was triggered at.
ReportCrash
Records a crash resulting from a Windows-specific SEH exception.
- exceptionData
- Exception data returned from GetExceptionInformation()
Returns: Code that signals the __except exception handler on how to proceed.
staticGetStackTrace
Returns a string containing a current stack trace.
If function can be found in the symbol table its readable name will be present in the stack trace, otherwise just its address.
Returns: String containing the call stack with each function on its own line.
Private
Methods
LogErrorAndStackTrace
Does what it says.
Internal utility function used by reportCrash().
LogErrorAndStackTrace
Does what it says.
Internal utility function used by reportCrash().
SaveCrashLog
Does what it says.
Internal utility function used by reportCrash().
staticGetCrashFolder
Creates the crash report directory and returns its path.
staticGetCrashTimestamp
Returns the current time as a string timestamp.
This is used to name the crash report directory..
staticInstanceInternal
Returns a singleton instance of this module.