Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoErrorStack Class Reference

VSG extension Stack debugging handler. More...

#include <Inventor/errors/SoErrorStack.h>

+ Inheritance diagram for SoErrorStack:

Classes

struct  StackFrame
 This struture contains the description of a stack frame. More...
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for an instance of SoErrorStack.
 
std::vector< SoErrorStack::StackFramegetStackFrames () const
 Returns the stack frames of the current callback stack.
 
SbString getStack () const
 This function returns a decoded version of the getStackFrames() function.
 
- Public Member Functions inherited from SoError
const SbStringgetDebugString () const
 Returns debug string containing full error information from instance.
 
virtual ~SoError ()
 Destructor.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static void setHandlerCallback (SoErrorCB *cb, void *data)
 Sets the handler callback for the SoErrorStack class.
 
static SoErrorCBgetHandlerCallback ()
 Returns the handler callback for the SoErrorStack class.
 
static void * getHandlerData ()
 Returns the handler callback data for the SoErrorStack class.
 
static SoType getClassTypeId ()
 Returns the type identifier for the SoErrorStack class.
 
static void post ()
 Posts the current callstack to the application callback or to SoDebugError if the custom callback was not specified.
 
- Static Public Member Functions inherited from SoError
static void setHandlerCallback (SoErrorCB *cb, void *data)
 Sets handler callback for SoError class.
 
static SoErrorCBgetHandlerCallback ()
 Returns handler callback for SoError class.
 
static void * getHandlerData ()
 Returns handler data for SoError class.
 
static SoType getClassTypeId ()
 Returns type identifier for SoError class.
 
static SoPRINTF void post (const char *formatString ...)
 Posts an error.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Detailed Description

VSG extension Stack debugging handler.

SoErrorStack is used to obtain and/or report the program callstack.

The post() method gets the actual callstack and calls a custom callback, if one is defined, else it dumps the callstack using SoDebugError.

It is also possible to allow SoStackError to automaticaly report the callstack, when a signal is reported by the system, by setting OIV_DEBUG_STACKERROR to 1.

SEE ALSO

SoReadError

Definition at line 46 of file SoErrorStack.h.

Member Function Documentation

◆ getClassTypeId()

static SoType SoErrorStack::getClassTypeId ( )
static

Returns the type identifier for the SoErrorStack class.

◆ getHandlerCallback()

static SoErrorCB * SoErrorStack::getHandlerCallback ( )
static

Returns the handler callback for the SoErrorStack class.

Returns
The SoErrorCB specified by the setHandlerCallback function.

◆ getHandlerData()

static void * SoErrorStack::getHandlerData ( )
static

Returns the handler callback data for the SoErrorStack class.

Returns
The void* pointer specified by the setHandlerCallback function.

◆ getStack()

SbString SoErrorStack::getStack ( ) const

This function returns a decoded version of the getStackFrames() function.

Returns
A string which contains a human readable version of the stack.

◆ getStackFrames()

std::vector< SoErrorStack::StackFrame > SoErrorStack::getStackFrames ( ) const

Returns the stack frames of the current callback stack.

This function is useful to get the stack frames when the custom callback is called.

Returns
The list of frames in the actual callstack.

◆ getTypeId()

virtual SoType SoErrorStack::getTypeId ( ) const
virtual

Returns the type identifier for an instance of SoErrorStack.

Reimplemented from SoError.

◆ post()

static void SoErrorStack::post ( )
static

Posts the current callstack to the application callback or to SoDebugError if the custom callback was not specified.

◆ setHandlerCallback()

static void SoErrorStack::setHandlerCallback ( SoErrorCB cb,
void *  data 
)
static

Sets the handler callback for the SoErrorStack class.

Parameters
cbThe error callback.
dataCustom data forwarded to the callback, can be NULL.

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