The Exception class is the only type of exception that is utilized throughout the library. More...
#include <Exception.h>
Public Member Functions | |
Exception (const std::string &what) | |
Exception (const std::string &what, const std::string &file, int line, const std::string &function) | |
Constructor to be used in conjunction with macro FL_AT More... | |
virtual | ~Exception () FL_INOEXCEPT FL_IOVERRIDE |
virtual void | setWhat (const std::string &what) |
Sets the message of the std::exception More... | |
virtual std::string | getWhat () const |
Gets the message of the std::exception More... | |
virtual const char * | what () const FL_INOEXCEPT FL_IOVERRIDE |
Gets the message of the std::exception More... | |
virtual void | append (const std::string &whatElse) |
Appends a message to the exception. More... | |
virtual void | append (const std::string &file, int line, const std::string &function) |
Appends an error trace to the exception. More... | |
virtual void | append (const std::string &whatElse, const std::string &file, int line, const std::string &function) |
Appends an error trace with a message to the exception. More... | |
Static Public Member Functions | |
static std::string | btCallStack () |
Returns the stack trace (if enabled) More... | |
static void | signalHandler (int signal) |
Provides a signal handler to catch signals. More... | |
static void | convertToException (int signal) |
Converts a given signal into an Exception (does not work very well on Windows) More... | |
static void | terminate () |
Provides a handler for terminate and unexpected signals. More... | |
static void | catchException (const std::exception &exception) |
Logs the exception to console and proceeds the regular execution of the library. More... | |
The Exception class is the only type of exception that is utilized throughout the library.
If the library is built with the compiling flag -DFL_BACKTRACE=ON
, the method Exception::btCallStack() will provide a stack trace when an exception is thrown. Please, have in mind that enabling the stack trace requires the external library dbghelp
in the Windows platform, which is generally available in the operating system.
Definition at line 49 of file Exception.h.
|
explicit |
|
explicit |
Constructor to be used in conjunction with macro FL_AT
what | is the message of the exception |
file | is the name of the file where the exception occurred |
line | is the line number in the file where the exception occurred |
function | is the name of the function where the exception occurred |
|
virtual |
|
virtual |
Appends a message to the exception.
whatElse | is a message to the exception |
|
virtual |
Appends an error trace to the exception.
The method can be called utilizing the macro FL_AT
file | is the name of the file where the exception occurred |
line | is the line number in the file where the exception occurred |
function | is the name of the function where the exception occurred |
|
virtual |
Appends an error trace with a message to the exception.
The method can be called utilizing the macro FL_AT
whatElse | is further information about the exception |
file | is the name of the file where the exception occurred |
line | is the line number in the file where the exception occurred |
function | is the name of the function where the exception occurred |
|
static |
Returns the stack trace (if enabled)
|
static |
Logs the exception to console and proceeds the regular execution of the library.
exception | is the exception thrown |
|
static |
Converts a given signal into an Exception (does not work very well on Windows)
signal | is the code of the signal |
|
virtual |
Gets the message of the std::exception
std::exception
|
virtual |
Sets the message of the std::exception
what | is the message of the std::exception |
|
static |
Provides a signal handler to catch signals.
signal | is the code of the signal |
|
static |
Provides a handler for terminate
and unexpected
signals.
|
virtual |
Gets the message of the std::exception
std::exception