CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdErrorContext Class Referenceabstract

#include <OdErrorContext.h>

Inheritance diagram for OdErrorContext:
OdRxObject OdDefaultErrorContext OdUserErrorContext TxErrorContext OdFileExceptionContext AECErrorContext

Public Member Functions

virtual ~OdErrorContext ()
 
virtual OdString description () const =0
 
virtual OdResult code () const =0
 
OdString completeDescription () const
 
OdErrorContextgetPreviousError () const
 
void setPreviousError (OdErrorContext *pPreviousError)
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdErrorContext ()
 
 OdErrorContext (OdErrorContext *pPreviousError)
 

Protected Attributes

OdErrorContextm_pPreviousError
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
static void rxInit ()
 
static void rxUninit ()
 

Detailed Description

This class implements a node in an ErrorContext stack.

Remarks
Each ErrorContext object points to the previous ErrorContext object in the stack. Note that this class is not registered in ODA RTTI, so be careful when storing these objects in OdSmartPtr (use dynamic_cast if necessary)

Corresponding C++ library: TD_Root <group Error_Classes>

Definition at line 45 of file OdErrorContext.h.

Constructor & Destructor Documentation

◆ OdErrorContext() [1/2]

OdErrorContext::OdErrorContext ( )
inlineprotected

Definition at line 49 of file OdErrorContext.h.

◆ OdErrorContext() [2/2]

OdErrorContext::OdErrorContext ( OdErrorContext * pPreviousError)
protected

Constructor for the OdErrorContext class.

Parameters
pPreviousError[in] Pointer to the previous ErrorContext object.

◆ ~OdErrorContext()

virtual OdErrorContext::~OdErrorContext ( )
virtual

Destructor for the OdErrorContext class.

Member Function Documentation

◆ code()

virtual OdResult OdErrorContext::code ( ) const
pure virtual

Returns the OdResult code of this ErrorContext object.

Implemented in AECErrorContext, OdDefaultErrorContext, OdUserErrorContext, and TxErrorContext.

◆ completeDescription()

OdString OdErrorContext::completeDescription ( ) const

Returns the complete description of this ErrorContext object.

Remarks
completeDescription() returns a string containing the concatenation of all of the description strings in the ErrorContext stack.

The default implementation of this function returns a string in the following format:

           <Description n-1>\n
            Previous error: <Description n-2>\n
            Previous error: <Description n-3>\n
            ...
            Previous error: <Description 0>\n

◆ description()

virtual OdString OdErrorContext::description ( ) const
pure virtual

Returns the description of this ErrorContext object.

Implemented in AECErrorContext, OdDefaultErrorContext, OdFileExceptionContext, OdUserErrorContext, and TxErrorContext.

◆ getPreviousError()

OdErrorContext * OdErrorContext::getPreviousError ( ) const
inline

Returns the ErrorContext object previous to this one in this ErrorContext stack.

Definition at line 91 of file OdErrorContext.h.

◆ setPreviousError()

void OdErrorContext::setPreviousError ( OdErrorContext * pPreviousError)

Sets the ErrorContext object previous to this one in this ErrorContext stack.

Parameters
pPreviousError[in] Pointer to the previous ErrorContext object.

Member Data Documentation

◆ m_pPreviousError

OdErrorContext* OdErrorContext::m_pPreviousError
protected

Definition at line 48 of file OdErrorContext.h.


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