An exception that thrown when non-c++ unhandled error occurs (i.e. access violation).
More...
An exception that thrown when non-c++ unhandled error occurs (i.e. access violation).
- Note
- AFatalException::setGlobalHandler is supported on all platforms, but translation to AFatalError is not as it uses compiler-specific flags and hacks. See "Platform support" for further info.
Translation to throwing AFatalException recovers the application from crashed state, providing you ability to handle such errors and continue normal application execution. However, still recommended to handle such errors with setGlobalHandler() to at least save user data.
Platform support
◆ address()
void * AFatalException::address |
( |
| ) |
const |
|
inline |
- Returns
- Address where does the fatal exception occurred.
◆ getMessage()
AString AFatalException::getMessage |
( |
| ) |
const |
|
overridevirtualnoexcept |
◆ nativeSignalId()
int AFatalException::nativeSignalId |
( |
| ) |
const |
|
inline |
◆ setGlobalHandler()
static void AFatalException::setGlobalHandler |
( |
Handler |
globalHandler | ) |
|
|
inlinestatic |
Sets handler for fatal exceptions.
- Parameters
-
The handler is called inside OS's signal callback, thus, it's not recommended to use the following operations during callback execution:
-
I/O (printf, logging, fopen, fread, fwrite, etc...)
-
Heap routines (malloc, free, new, delete), including heap-based containers (std::vector, std::list, std::queue, etc...)
-
System calls (time, getcwd, etc...)
Basically, you may want to define global AOptional<AFatalException> and store the copy of exception in order to process it outside of the callback.
The callback may be used for handling and sending telemetry data (however, be aware of using unrecommended operations).
◆ signalName()
std::string_view AFatalException::signalName |
( |
| ) |
const |
|
inline |
#include <AUI/Common/AFatalException.h>
The documentation for this class was generated from the following files:
- aui.core/src/AUI/Common/AFatalException.h
- aui.core/src/AUI/Common/AFatalException.cpp