Raytrix Light Field SDK  4.0
Logo
Public Member Functions | Protected Attributes | List of all members
Rx::CRxException Class Reference

Detailed Description

Raytrix exception base class. All exceptions are based on this class.

Inherits IException31.

Inherited by Rx::CRxCalibrationDatabaseMissingException, Rx::CRxErrnoException, Rx::CRxFileNotFoundException, Rx::CRxOperatingSystemException, and Rx::CRxOutOfMemoryException.

Public Member Functions

 CRxException (const CRxString &sxMsg, const char *pcFile, const char *pcFunc, int iLine)
 Constructor. More...
 
 CRxException (const CRxString &sxMsg, const char *pcFile, const char *pcFunc, int iLine, const IException30 &ex)
 Constructor. More...
 
 CRxException (const CRxString &sxMsg, const char *pcFile, const char *pcFunc, int iLine, const IException31 &ex)
 Constructor. More...
 
virtual ~CRxException ()
 Virtual destructor. More...
 
virtual const char * GetFile () const
 Gets the file name. More...
 
virtual const char * GetFunction () const
 Gets the function name. More...
 
virtual const CGuid30GetGUID () const
 Gets the unique identifier of this exception. This is not guaranteed to be the GUID of this exception type. More...
 
virtual const IException31 * GetInnerException () const
 Gets the inner exception if one is available. Otherwise nullptr is returned. More...
 
virtual int GetLine () const
 Gets the line. More...
 
virtual const char * GetMessageText () const
 Gets message text. More...
 
const IException31 * GetMostInnerException () const
 Gets the most inner exception. More...
 
virtual const char * GetName () const
 Gets the name of this exception. More...
 
template<class TException >
bool HasException () const
 Query if this exception or one of its inner exceptions contains an exception of the given type. More...
 
virtual bool HasException (const CGuid30 &xGUID) const
 Query if this exception or one of its inner exceptions contains an exception of the given GUID. More...
 
 RX_EXCEPTION_BASE_IMPLEMENTATION (CRxException,"Rx.RxException","{491260D2-0D75-4CCD-A2C5-46428B450B66}")
 
virtual void SetExceptionData ()
 Sets additional exception data. More...
 
void SetGUID (const CGuid30 &xGUID)
 Sets the GUID of this exception. This is not guaranteed to be the GUID of this exception type. More...
 
void SetInnerException (const IException31 &ex)
 Sets the given exception as the inner exception. More...
 
virtual CRxString ToString () const
 Convert this exception into a string representation. More...
 
CRxString ToString (bool bIncludeInner) const
 Convert this exception into a string representation. More...
 

Protected Attributes

CRxString m_sxMessage
 
CRxString m_sxName
 
CGuid30 m_xGUID
 
CExceptionSafePointer m_xInnerException
 
CCodeLocation m_xLocation
 

Constructor & Destructor Documentation

Rx::CRxException::CRxException ( const CRxString sxMsg,
const char *  pcFile,
const char *  pcFunc,
int  iLine 
)

Constructor.

Parameters
sxMsgThe message string.
pcFileThe file.
pcFuncThe function.
iLineThe line.
Rx::CRxException::CRxException ( const CRxString sxMsg,
const char *  pcFile,
const char *  pcFunc,
int  iLine,
const IException30 ex 
)

Constructor.

Parameters
sxMsgThe message string.
pcFileThe file.
pcFuncThe function.
iLineThe line.
exThe inner exception.
Rx::CRxException::CRxException ( const CRxString sxMsg,
const char *  pcFile,
const char *  pcFunc,
int  iLine,
const IException31 &  ex 
)

Constructor.

Parameters
sxMsgThe message string.
pcFileThe file.
pcFuncThe function.
iLineThe line.
exThe inner exception.
virtual Rx::CRxException::~CRxException ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

virtual const char* Rx::CRxException::GetFile ( ) const
virtual

Gets the file name.

Returns
The file name.
virtual const char* Rx::CRxException::GetFunction ( ) const
virtual

Gets the function name.

Returns
The function name.
virtual const CGuid30& Rx::CRxException::GetGUID ( ) const
virtual

Gets the unique identifier of this exception. This is not guaranteed to be the GUID of this exception type.

Returns
The unique identifier.
virtual const IException31* Rx::CRxException::GetInnerException ( ) const
virtual

Gets the inner exception if one is available. Otherwise nullptr is returned.

Returns
The inner exception.
virtual int Rx::CRxException::GetLine ( ) const
virtual

Gets the line.

Returns
The line number.
virtual const char* Rx::CRxException::GetMessageText ( ) const
virtual

Gets message text.

Returns
Null if it fails, else the message text.
const IException31* Rx::CRxException::GetMostInnerException ( ) const

Gets the most inner exception.

Returns
The most inner exception. If there is no inner exception, this exception is returned.
virtual const char* Rx::CRxException::GetName ( ) const
virtual

Gets the name of this exception.

Returns
The name of this exception.
template<class TException >
bool Rx::CRxException::HasException ( ) const
inline

Query if this exception or one of its inner exceptions contains an exception of the given type.

Template Parameters
TExceptionThe exception type to test for.
Returns
True if this exception or one of its inner exceptions contains an exception of the given type, false if not.
virtual bool Rx::CRxException::HasException ( const CGuid30 xGUID) const
virtual

Query if this exception or one of its inner exceptions contains an exception of the given GUID.

Parameters
xGUID[in] The GUID of the exception to look for.
Returns
True if this exception or one of its inner exceptions contains an exception of the given GUID, false if not.
Rx::CRxException::RX_EXCEPTION_BASE_IMPLEMENTATION ( CRxException  ,
"Rx.RxException"  ,
"{491260D2-0D75-4CCD-A2C5-46428B450B66}"   
)
virtual void Rx::CRxException::SetExceptionData ( )
virtual

Sets additional exception data.

void Rx::CRxException::SetGUID ( const CGuid30 xGUID)
inline

Sets the GUID of this exception. This is not guaranteed to be the GUID of this exception type.

Parameters
xGUIDUnique identifier.
void Rx::CRxException::SetInnerException ( const IException31 &  ex)
inline

Sets the given exception as the inner exception.

Parameters
exThe exception.
virtual CRxString Rx::CRxException::ToString ( ) const
virtual

Convert this exception into a string representation.

Returns
This exception as a string.
CRxString Rx::CRxException::ToString ( bool  bIncludeInner) const

Convert this exception into a string representation.

Parameters
bIncludeInnerTrue to include all inner exceptions.
Returns
This exception as a string.

Member Data Documentation

CRxString Rx::CRxException::m_sxMessage
protected
CRxString Rx::CRxException::m_sxName
protected
CGuid30 Rx::CRxException::m_xGUID
protected
CExceptionSafePointer Rx::CRxException::m_xInnerException
protected
CCodeLocation Rx::CRxException::m_xLocation
protected