.TH "SoError" 3 "Fri Sep 6 2024 15:32:06" "Version 4.0.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoError \- The \fBSoError\fP class is the base class for all the error handling classes\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherited by \fBSoDebugError\fP, \fBSoMemoryError\fP, and \fBSoReadError\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoError\fP ()" .br .ti -1c .RI "const \fBSbString\fP & \fBgetDebugString\fP (void) const" .br .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const" .br .ti -1c .RI "SbBool \fBisOfType\fP (const \fBSoType\fP type) const" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static void \fBsetHandlerCallback\fP (SoErrorCB *const func, void *const data)" .br .ti -1c .RI "static SoErrorCB * \fBgetHandlerCallback\fP (void)" .br .ti -1c .RI "static void * \fBgetHandlerData\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBpost\fP (const char *const format,\&.\&.\&.)" .br .ti -1c .RI "static \fBSbString\fP \fBgetString\fP (const \fBSoNode\fP *const node)" .br .ti -1c .RI "static \fBSbString\fP \fBgetString\fP (const \fBSoPath\fP *const path)" .br .ti -1c .RI "static \fBSbString\fP \fBgetString\fP (const \fBSoEngine\fP *const engine)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static void \fBinitClasses\fP (void)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual SoErrorCBPtr \fBgetHandler\fP (void *&data) const" .br .ti -1c .RI "void \fBsetDebugString\fP (const char *const str)" .br .ti -1c .RI "void \fBappendToDebugString\fP (const char *const str)" .br .ti -1c .RI "void \fBhandleError\fP (void)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static void \fBdefaultHandlerCB\fP (const \fBSoError\fP *error, void *userdata)" .br .in -1c .SH "Detailed Description" .PP The \fBSoError\fP class is the base class for all the error handling classes\&. The default error handler just prints messages on the standard error output channel, but this can be overridden by client applications\&. .PP Being able to override the default handler is useful when you want to collect error messages upon e\&.g\&. model import for later presentation of the messages to the user in any custom manner (like for instance in a GUI message box)\&. .PP The \fBSoError\fP class is not designed to be particularly useful for 'direct use'\&. Within the Coin library it is only used through its subclasses\&. .SH "Constructor & Destructor Documentation" .PP .SS "virtual SoError::~SoError ()\fR [inline]\fP, \fR [virtual]\fP" The default destructor does nothing\&. .SH "Member Function Documentation" .PP .SS "void SoError::setHandlerCallback (SoErrorCB *const function, void *const data)\fR [static]\fP" This method sets the error handler callback for messages posted via this class\&. .PP Note that this will not override the error/debug message handler for subclasses, these will have to be overridden by calling the subclass' \fBsetHandlerCallback()\fP method\&. .PP \fBSee also\fP .RS 4 \fBdefaultHandlerCB()\fP .RE .PP .SS "SoErrorCB * SoError::getHandlerCallback (void )\fR [static]\fP" Returns the error handler callback for messages posted via this class\&. .SS "void * SoError::getHandlerData (void )\fR [static]\fP" This method returns the pointer used for passing data back to the callback handler method\&. .SS "const \fBSbString\fP & SoError::getDebugString (void ) const" This method returns an \fBSbString\fP containing error info from the given error instance\&. .SS "\fBSoType\fP SoError::getClassTypeId (void )\fR [static]\fP" This static method returns the \fBSoType\fP for this class\&. .PP \fBSee also\fP .RS 4 \fBgetTypeId()\fP .RE .PP .SS "\fBSoType\fP SoError::getTypeId (void ) const\fR [virtual]\fP" This method returns the \fBSoType\fP of a particular object instance\&. .PP \fBSee also\fP .RS 4 \fBgetClassTypeId()\fP .RE .PP .PP Reimplemented in \fBSoDebugError\fP, \fBSoMemoryError\fP, and \fBSoReadError\fP\&. .SS "SbBool SoError::isOfType (const \fBSoType\fP type) const" This method returns \fRTRUE\fP if the error instance is of - or derived from - \fItype\fP, and \fRFALSE\fP otherwise\&. .SS "void SoError::post (const char *const format, \&.\&.\&.)\fR [static]\fP" This method posts an error message\&. The \fIformat\fP string and the trailing arguments should follow the printf() standard\&. .SS "\fBSbString\fP SoError::getString (const \fBSoNode\fP *const node)\fR [static]\fP" Constructs a string identifying the \fInode\fP with name (if available) and memory pointer\&. .SS "\fBSbString\fP SoError::getString (const \fBSoPath\fP *const path)\fR [static]\fP" Constructs a string identifying the \fIpath\fP with name (if available) and memory pointer\&. .SS "\fBSbString\fP SoError::getString (const \fBSoEngine\fP *const engine)\fR [static]\fP" Constructs a string identifying the \fIengine\fP with name (if available) and memory pointer\&. .SS "void SoError::initClass (void )\fR [static]\fP" This method takes care of initializing all static data for the class\&. .SS "void SoError::initClasses (void )\fR [static]\fP" This static method initializes all the \fBSoError\fP classes\&. .SS "void SoError::defaultHandlerCB (const \fBSoError\fP * error, void * data)\fR [static]\fP, \fR [protected]\fP" Contains the default code for handling error strings\&. .PP Default treatment of an error message is to print it out on the standard error file handle\&. .SS "SoErrorCB * SoError::getHandler (void *& data) const\fR [protected]\fP, \fR [virtual]\fP" This is just a convenience wrapper around the \fBgetHandlerCallback()\fP and \fBgetHandlerData()\fP methods\&. .PP Reimplemented in \fBSoDebugError\fP, \fBSoMemoryError\fP, and \fBSoReadError\fP\&. .SS "void SoError::setDebugString (const char *const str)\fR [protected]\fP" Replace the latest stored debug string with \fIstr\fP\&. .SS "void SoError::appendToDebugString (const char *const str)\fR [protected]\fP" Add \fIstr\fP at the end of the currently stored debug string\&. .SS "void SoError::handleError (void )\fR [protected]\fP" This method calls the appropriate handler for an error instance\&. All error handling goes through this method, and is therefore a good candidate for a debugger breakpoint\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.