OpenWalnut
1.5.0dev
|
Base exception class for handling segmentation faults. More...
#include <WSegmentationFault.h>
Public Member Functions | |
WSegmentationFault (const std::string &msg="Segmentation Fault") | |
Default constructor. More... | |
virtual | ~WSegmentationFault () throw () |
Destructor. More... | |
Public Member Functions inherited from WException | |
WException (const std::string &msg=std::string()) | |
Default constructor. More... | |
WException (const std::exception &e) | |
Copy a std::exception and encapsulate it. More... | |
virtual | ~WException () throw () |
Destructor. More... | |
virtual const char * | what () const throw () |
Returns the message string set on throw. More... | |
std::string | getTrace () const |
Prints the trace of the call chain which caused this exception. More... | |
std::string | getBacktrace () const |
Returns a call stacktrace. More... | |
Static Public Member Functions | |
static int | getSignalNumber () throw () |
Defines signal type to handle. More... | |
static void | installSignalHandler () throw () |
Installs this exception as signal handler for SIGSEGV. More... | |
Static Public Member Functions inherited from WException | |
static void | disableBacktrace () |
Function disables backtraces. More... | |
Additional Inherited Members | |
Protected Attributes inherited from WException | |
std::string | m_msg |
Message given during throw. More... | |
std::list< std::string > | m_trace |
Stack trace for identifying the source where this exception came from. More... | |
Static Protected Attributes inherited from WException | |
static bool | noBacktrace = false |
True if the backtrace should NOT be printed. More... | |
Base exception class for handling segmentation faults.
It throws segmentation faults as exceptions. Please remember that SIGSEGV is not recoverable, which means it can NOT be catched! Also note that this will only work on Linux.
Definition at line 78 of file WSegmentationFault.h.
|
explicit |
Default constructor.
msg | name of the exception. mostly the default "Segmentation Fault" |
Definition at line 29 of file WSegmentationFault.cpp.
References WException::m_msg.
|
virtual |
Destructor.
Definition at line 36 of file WSegmentationFault.cpp.
|
static |
Defines signal type to handle.
Definition at line 41 of file WSegmentationFault.cpp.
|
static |
Installs this exception as signal handler for SIGSEGV.
This will just work on Linux.
Definition at line 50 of file WSegmentationFault.cpp.