8 #ifndef __platform_Exception_h__ 9 #define __platform_Exception_h__ 13 #if FE_CODEGEN>FE_DEBUG 14 #define feX throw ::fe::Exception 16 #elif FE_COMPILER==FE_GNU 17 #define feX ::fe::Exception::stage(__FILE__,__LINE__,__PRETTY_FUNCTION__), throw ::fe::Exception 18 #elif FE_COMPILER==FE_MICROSOFT 19 #define feX ::fe::Exception::stage(__FILE__,__LINE__,__FUNCTION__), throw ::fe::Exception 21 #define feX ::fe::Exception::stage(__FILE__,__LINE__,__func__), throw ::fe::Exception 24 #define feAssert(cond,msg) {if(!(cond)){feX(msg);}} 34 class FE_DL_PUBLIC FE_DL_EXPORT
Exception:
public std::exception
40 const char *fmt, ...)
throw();
42 const char *fmt, ...)
throw();
44 const char *fmt, ...)
throw();
54 const char* what(
void)
const throw()
55 {
return m_message.c_str(); }
63 const String &getLocation(
void)
const throw()
64 {
return m_location; }
66 const String &getFile(
void)
const throw()
69 const String &getFunction(
void)
const throw()
70 {
return m_function; }
72 const String &getStack(
void)
const throw()
75 Result getResult(
void)
const throw()
78 int getLine(
void)
const throw()
82 void log(
void)
throw();
92 virtual void checkAssert(
void)
throw();
98 static void stage(
const char *file,
int line,
const char*
function)
116 static String ms_function;
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...
Definition: Exception.h:98
kernel
Definition: namespace.dox:3
Generic exception carrying a fe::String payload.
Definition: Exception.h:34
Automatically reference-counted string container.
Definition: String.h:128
const String & getMessage(void) const
Return the fe::String payload.
Definition: Exception.h:60