Free Electron
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
fe::Exception Class Reference

Generic exception carrying a fe::String payload. More...

#include <Exception.h>

Inherits exception.

Inherited by fe::BaseAccessor::Exception.

Public Member Functions

 Exception (const char *fmt,...) throw ()
 
 Exception (const char *location, const char *fmt,...) throw ()
 
 Exception (const Result &result, const char *fmt,...) throw ()
 
 Exception (const Result &result, const char *location, const char *fmt,...) throw ()
 
 Exception (const Result &result, const char *location, String fmt,...) throw ()
 
 Exception (const Result &result) throw ()
 
 Exception (const Exception &other) throw ()
 
virtual const char * what (void) const throw ()
 
Exceptionoperator= (const Exception &other) throw ()
 
const StringgetMessage (void) const throw ()
 Return the fe::String payload. More...
 
const StringgetLocation (void) const throw ()
 
const StringgetFile (void) const throw ()
 
const StringgetFunction (void) const throw ()
 
const StringgetStack (void) const throw ()
 
Result getResult (void) const throw ()
 
int getLine (void) const throw ()
 
void log (void) throw ()
 Send the message to the global log. More...
 
virtual void checkAssert (void) throw ()
 Assert instead of except, if selected. More...
 

Static Public Member Functions

static void stage (const char *file, int line, const char *function)
 Not thread safe, so exceptions thrown from multiple threads are in a race condition on file and line. More...
 

Protected Attributes

String m_message
 
String m_location
 
Result m_result
 
String m_file
 
int m_line
 
String m_function
 
String m_stack
 

Static Protected Attributes

static String ms_file = ""
 
static int ms_line = 0
 
static String ms_function = ""
 

Detailed Description

Generic exception carrying a fe::String payload.

Member Function Documentation

◆ checkAssert()

void fe::Exception::checkAssert ( void  )
throw (
)
virtual

Assert instead of except, if selected.

If the env variable "FE_E_ASSERT" is set, exceptions cause an assertion when they create. They don't have to be thrown first.

◆ getMessage()

const String& fe::Exception::getMessage ( void  ) const
throw (
)
inline

Return the fe::String payload.

◆ log()

void fe::Exception::log ( void  )
throw (
)

Send the message to the global log.

◆ stage()

static void fe::Exception::stage ( const char *  file,
int  line,
const char *  function 
)
inlinestatic

Not thread safe, so exceptions thrown from multiple threads are in a race condition on file and line.


The documentation for this class was generated from the following files: