Open Inventor Reference
SoCatch Class Reference

Class containing static functions to control global exception handling for OpenInventor.

#include <Inventor/SoCatch.h>

List of all members.

Static Public Member Functions

static SbBool isExceptionHandlingEnabled ()
 Function to query exception handling for all SO_CATCH* macros.
static void enableExceptionHandling (SbBool on)
 Function to enabled/disable exception handling for all SO_CATCH* macros when passing TRUE/FALSE.
static void initClass ()
 Initializes the SoCatch class.
static void postExceptionMessage (SoType ERR_OBJ_TYPE_ID, const char *OP_DESCR_STR, SoType ACTION_TYPE_ID, const char *END_STR)
 Posts composed error message.

Detailed Description

Definition at line 67 of file SoCatch.h.


Member Function Documentation

static void SoCatch::enableExceptionHandling ( SbBool  on) [static]
static void SoCatch::initClass ( ) [static]
static SbBool SoCatch::isExceptionHandlingEnabled ( ) [static]
static void SoCatch::postExceptionMessage ( SoType  ERR_OBJ_TYPE_ID,
const char *  OP_DESCR_STR,
SoType  ACTION_TYPE_ID,
const char *  END_STR 
) [static]

Used in catch branches on caught exceptions. All accesses on construction parts of message fragments are done as save as possible so that even crashes in type name accesses hopefully do not lead to further crashes but in a controlled error message.

ERR_OBJ_TYPE_ID may be SoType::badType() which will be handled as no type (ignored). On all other type ids the id name will be used as string parameter for the error report. It typically should be the type id of the object which probably caused the crash.

OP_DESCR_STR may be "" or another string describing the operation which were applied while the error occured, for example "delete" when the code between try / catch is for example "delete ERR_OBJ_PTR;".

ACTION_TYPE_ID may be SoType::badType() which will be handled as no type (ignored). On all other type ids the name will be used as string parameter for error report. It should typically be the class type id of the class which was using the error causing object (for example an action traversing using a node).

END_STR may be "" or any other terminating string to finish the error message. "Crash in <ERR_OBJ_TYPE_ID.getName()> while <OP_DESCR_STR> <ACTION_TYPE_ID.getName()> <END_STR>"


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