rcolyer.net
RC Lib  Version 202403231100
Static Public Member Functions | List of all members
RC::Segfault Class Reference

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.
 

Detailed Description

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.


The documentation for this class was generated from the following file:
email address
— (c) 2015