.TH "SoDebugError" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoDebugError \- .PP The \fBSoDebugError\fP class is the internal debugging message passing mechanism\&. .PP This class basically serves two purposes: .SH SYNOPSIS .br .PP .PP \fC#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 .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 .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual SoErrorCBPtr \fBgetHandler\fP (void *&data) const " .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoDebugError\fP class is the internal debugging message passing mechanism\&. .PP This class basically serves two purposes: 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 has 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 functionnames must be given as 'classname::functioname' (ie 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\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoDebugError::getTypeId (void) const\fC [virtual]\fP" This method returns the \fBSoType\fP of a particular object instance\&. .PP \fBSee also:\fP .RS 4 getClassTypeId() .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 setHandlerCallback() .RE .PP .SS "void SoDebugError::post (const char *constsource, const char *constformat, \&.\&.\&.)\fC [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 *constsource, const char *constformat, \&.\&.\&.)\fC [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 *constsource, const char *constformat, \&.\&.\&.)\fC [static]\fP" This method posts a message with severity level 'INFO'\&. \fIsource\fP should be the name of the calling function\&. .SS "SoErrorCB * SoDebugError::getHandler (void *&data) const\fC [protected]\fP, \fC [virtual]\fP" This is just a convenience wrapper around the getHandlerCallback() and getHandlerData() methods\&. .PP Reimplemented from \fBSoError\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.