MIRA
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SerializableException Class Referenceabstract

#include <error/Exceptions.h>

Inheritance diagram for SerializableException:
Inheritance graph
[legend]

Public Member Functions

 SerializableException (const std::string &msg, const char *file=NULL, int line=0) MIRA_NOEXCEPT_OR_NOTHROW
 
virtual ~SerializableException () MIRA_NOEXCEPT_OR_NOTHROW
 
template<typename Reflector >
MIRA_SPLIT_REFLECT_MEMBER void reflectRead (Reflector &r)
 
template<typename Reflector >
void reflectWrite (Reflector &r)
 
virtual void raise (bool recursive=false)=0
 
Class const & getClass () const
 call the virtual internalGetClass(). More...
 
void addInfo (std::string message, const char *file=NULL, int line=0)
 Adds additional information to the exception. More...
 
virtual const char * what () const MIRA_NOEXCEPT_OR_NOTHROW
 Returns the text of exception containing the information given in MIRA_THROW and MIRA_RETHROW as well as the file name and line number where it was thrown. More...
 
std::string message () const MIRA_NOEXCEPT_OR_NOTHROW
 Similar to what(). More...
 
const CallStackcallStack () const
 Returns the state of the callstack at the moment when the exception was thrown. More...
 
ThreadID getThreadID () const
 Returns the id of the thread where the exception was thrown. More...
 
template<typename DerivedException >
DerivedException & addStackInfo ()
 FOR INTERNAL USE ONLY. More...
 
template<typename DerivedException >
DerivedException & addExternalStackInfo (CallStack stack, ThreadID thread)
 Stores the provided callstack and thread id within the exception. More...
 
const InfogetInfo () const
 Returns the first info packet that describes the location where the exception has occured. More...
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Protected Member Functions

 SerializableException ()
 
virtual Class const & internalGetClass () const =0
 

Protected Attributes

std::list< InfomInfos
 
CallStack mStack
 
ThreadID mThreadID
 
std::string mMessage
 as cache for what() More...
 

Friends

class ClassFactoryDefaultConstClassBuilder
 

Constructor & Destructor Documentation

◆ SerializableException() [1/2]

SerializableException ( )
inlineprotected

◆ SerializableException() [2/2]

SerializableException ( const std::string &  msg,
const char *  file = NULL,
int  line = 0 
)
inline

◆ ~SerializableException()

virtual ~SerializableException ( )
inlinevirtual

Member Function Documentation

◆ reflectRead()

MIRA_SPLIT_REFLECT_MEMBER void reflectRead ( Reflector &  r)
inline

◆ reflectWrite()

void reflectWrite ( Reflector &  r)
inline

◆ raise()

virtual void raise ( bool  recursive = false)
pure virtual

◆ getClass()

Class const& getClass ( ) const
inlineinherited

call the virtual internalGetClass().

◆ CLASS()

static PseudoClass const& CLASS ( )
inlinestaticinherited

◆ internalGetClass()

virtual Class const& internalGetClass ( ) const
protectedpure virtualinherited

◆ addInfo()

void addInfo ( std::string  message,
const char *  file = NULL,
int  line = 0 
)
inlineinherited

Adds additional information to the exception.

Note
Ususally this method is not called directly, instead MIRA_RETHROW should be used to add additional information and to rethrow the exception.
See also
MIRA_THROW, MIRA_RETHROW

◆ what()

virtual const char* what ( ) const
virtualinherited

Returns the text of exception containing the information given in MIRA_THROW and MIRA_RETHROW as well as the file name and line number where it was thrown.

See also
MIRA_THROW, MIRA_RETHROW

◆ message()

std::string message ( ) const
inherited

Similar to what().

Returns the text of exception containing the information given in MIRA_THROW and MIRA_RETHROW without the file name and line number in a single line string.

See also
MIRA_THROW, MIRA_RETHROW

◆ callStack()

const CallStack& callStack ( ) const
inlineinherited

Returns the state of the callstack at the moment when the exception was thrown.

◆ getThreadID()

ThreadID getThreadID ( ) const
inlineinherited

Returns the id of the thread where the exception was thrown.

◆ addStackInfo()

DerivedException& addStackInfo ( )
inlineinherited

FOR INTERNAL USE ONLY.

Stores the current callstack and thread id within the exception. This method is called by the MIRA_THROW macro and is for internal use. You never need to call this method manually.

◆ addExternalStackInfo()

DerivedException& addExternalStackInfo ( CallStack  stack,
ThreadID  thread 
)
inlineinherited

Stores the provided callstack and thread id within the exception.

This can be used to create an exception with a callstack from an external source (e.g. for an exception originally thrown in an RPC).

◆ getInfo()

const Info& getInfo ( ) const
inlineinherited

Returns the first info packet that describes the location where the exception has occured.

Friends And Related Function Documentation

◆ ClassFactoryDefaultConstClassBuilder

friend class ClassFactoryDefaultConstClassBuilder
friend

Member Data Documentation

◆ mInfos

std::list<Info> mInfos
protectedinherited

◆ mStack

CallStack mStack
protectedinherited

◆ mThreadID

ThreadID mThreadID
protectedinherited

◆ mMessage

std::string mMessage
mutableprotectedinherited

as cache for what()


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