.TH "SoDebugError" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoDebugError \- The \fBSoDebugError\fP class is the internal debugging message passing mechanism\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoError\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBSeverity\fP { \fBERROR\fP, \fBWARNING\fP, \fBINFO\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const" .br .ti -1c .RI "\fBSoDebugError::Severity\fP \fBgetSeverity\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoError\fP .in +1c .ti -1c .RI "virtual \fB~SoError\fP ()" .br .ti -1c .RI "const \fBSbString\fP & \fBgetDebugString\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 function, 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 source, const char *const format,\&.\&.\&.)" .br .ti -1c .RI "static void \fBpostWarning\fP (const char *const source, const char *const format,\&.\&.\&.)" .br .ti -1c .RI "static void \fBpostInfo\fP (const char *const source, const char *const format,\&.\&.\&.)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoError\fP .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 .in -1c Protected Member Functions inherited from \fBSoError\fP .in +1c .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 "Additional Inherited Members" Static Protected Member Functions inherited from \fBSoError\fP .in +1c .ti -1c .RI "static void \fBdefaultHandlerCB\fP (const \fBSoError\fP *error, void *userdata)" .br .in -1c .SH "Detailed Description" .PP The \fBSoDebugError\fP class is the internal debugging message passing mechanism\&. This class basically serves two purposes: .PP 1) It is the message interface through which error and warning conditions are passed to the programmer which is using the Coin library API for building applications\&. These messages are generated when API methods are used in an incorrect manner, or if actions on the library have caused it to enter an inconsistent state\&. Coin programmers should then quickly be able to trace down errors in their application code\&. .PP For this service to be available, the Coin library must be compiled with debugging information\&. For release builds, most of this "programmer's safety net" is removed to gain maximum speed and to use minimum space (build the smallest possible library)\&. .PP 2) Coin application programmers can call the \fBSoDebugError\fP methods within their own code as a convenient way of debugging application code, replacing the usual cascades of fprintf() calls\&. .PP Coin supports an environment variable to set conditional breakpoints\&. The COIN_DEBUG_BREAK environment variable can be set to any number of functions in the form of a list separated by commas or spaces\&. The function names must be given as "classname::functionname" (i\&.e\&. without return type, parenthesis or argument types or names)\&. If a debug message is posted from one of those functions, your program will be stopped (using assert(0))\&. .PP This can be useful if you want to get core-dumps or enter a debugger whenever for instance a warning or an error is posted from some function (e\&.g\&. "SbVec3f::normalize")\&. This feature is only enabled in the debug version of Coin\&. .SH "Member Enumeration Documentation" .PP .SS "enum \fBSoDebugError::Severity\fP" Specifies the available severity levels of the debug messages\&. .PP \fBEnumerator\fP .in +1c .TP \f(BIERROR \fP \fBSeverity\fP level for errors\&. .TP \f(BIWARNING \fP \fBSeverity\fP level for warnings\&. .TP \f(BIINFO \fP \fBSeverity\fP level for additional information\&. .SH "Member Function Documentation" .PP .SS "void SoDebugError::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 * SoDebugError::getHandlerCallback (void )\fR [static]\fP" Returns the error handler callback for messages posted via this class\&. .SS "void * SoDebugError::getHandlerData (void )\fR [static]\fP" This method returns the pointer used for passing data back to the callback handler method\&. .SS "\fBSoType\fP SoDebugError::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 SoDebugError::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 from \fBSoError\fP\&. .SS "\fBSoDebugError::Severity\fP SoDebugError::getSeverity (void ) const" Returns severity level of current message\&. .PP You can use this to filter out debug messages and only let warnings and/or errors pass through to the end-user if you have set your own handler callback\&. .PP \fBSee also\fP .RS 4 \fBsetHandlerCallback()\fP .RE .PP .SS "void SoDebugError::post (const char *const source, const char *const format, \&.\&.\&.)\fR [static]\fP" This method posts a message with severity level "ERROR"\&. \fIsource\fP should be the name of the calling function\&. .SS "void SoDebugError::postWarning (const char *const source, const char *const format, \&.\&.\&.)\fR [static]\fP" This method posts a message with severity level "WARNING"\&. \fIsource\fP should be the name of the calling function\&. .SS "void SoDebugError::postInfo (const char *const source, const char *const format, \&.\&.\&.)\fR [static]\fP" This method posts a message with severity level "INFO"\&. \fIsource\fP should be the name of the calling function\&. .SS "void SoDebugError::initClass (void )\fR [static]\fP" This method takes care of initializing all static data for the class\&. .SS "SoErrorCB * SoDebugError::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 from \fBSoError\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.