A static class for catching and throwing segfaults. More...
#include <Errors.h>
Static Public Member Functions | |
static void | Handler (int) |
The default handler for a segfault. It throws ErrorMsgFatal. | |
static void | SetHandler () |
Call this to set the segfault handler to Segfault::Handler. | |
A static class for catching and throwing segfaults.
Call Segfault::SetHandler() at the beginning of the program, and segfaults will result in an ErrorMsgFatal with a descriptive stack trace. In gcc -fnon-call-exceptions is required for the exception to propagate out of this handler. Note: This is automatically called with the RC_MAIN { } macro.