SoError(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’– SoError(3) πŸ’–

okay bestie, welcome to the Coin manual page for SoError β€” she's a C++ class, she's the base class for all the error handling classes, and she is literally the mother of every error in the library. this is her whole page, no skips, no cap. 🫢


✨ NAME ✨

SoError β€” The SoError class is the base class for all the error handling classes. πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/errors/SoError.h>

Inherited by SoDebugError, SoMemoryError, and SoReadError. (yes, she has three daughters and they are all iconic πŸ’…)

🌸 Public Member Functions 🌸

  • virtual ~SoError ()
  • const SbString & getDebugString (void) const
  • virtual SoType getTypeId (void) const
  • SbBool isOfType (const SoType type) const

🌸 Static Public Member Functions 🌸

  • static void setHandlerCallback (SoErrorCB *const func, void *const data)
  • static SoErrorCB * getHandlerCallback (void)
  • static void * getHandlerData (void)
  • static SoType getClassTypeId (void)
  • static void post (const char *const format,...)
  • static SbString getString (const SoNode *const node)
  • static SbString getString (const SoPath *const path)
  • static SbString getString (const SoEngine *const engine)
  • static void initClass (void)
  • static void initClasses (void)

🌸 Protected Member Functions 🌸

  • virtual SoErrorCBPtr getHandler (void *&data) const
  • void setDebugString (const char *const str)
  • void appendToDebugString (const char *const str)
  • void handleError (void)

🌸 Static Protected Member Functions 🌸

  • static void defaultHandlerCB (const SoError *error, void *userdata)

✨ Detailed Description ✨

The SoError class is the base class for all the error handling classes. she's the blueprint, the moment, the blueprint-moment. πŸ’œ

The default error handler just prints messages on the standard error output channel, but this can be overridden by client applications.

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). so cute, so practical, we love a customizable girlie. πŸ’…

ngl, the SoError class is not designed to be particularly useful for "direct use". Within the Coin library it is only used through its subclasses. so like… don't come for her directly, she's a backstage queen πŸ‘‘

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

virtual SoError::~SoError () [inline], [virtual]

The default destructor does nothing. she leaves quietly, no drama, no cleanup, just vibes. πŸ’€βœ¨


πŸŽ€ Member Function Documentation πŸŽ€

void SoError::setHandlerCallback (SoErrorCB *const function, void *const data) [static]

This method sets the error handler callback for messages posted via this class.

⚠️ Note that this will not override the error/debug message handler for subclasses β€” these will have to be overridden by calling the subclass' setHandlerCallback() method. so don't think you can set it once and ghost the subclasses, bestie, they need their own. 😭

See also: defaultHandlerCB()


SoErrorCB * SoError::getHandlerCallback (void ) [static]

Returns the error handler callback for messages posted via this class. the one you set? yeah, she remembers. πŸ’–


void * SoError::getHandlerData (void ) [static]

This method returns the pointer used for passing data back to the callback handler method. it's giving "here's your stuff back". 🎁


const SbString & SoError::getDebugString (void ) const

This method returns an SbString containing error info from the given error instance.


SoType SoError::getClassTypeId (void ) [static]

This static method returns the SoType for this class.

See also: getTypeId()


SoType SoError::getTypeId (void ) const [virtual]

This method returns the SoType of a particular object instance.

See also: getClassTypeId()

Reimplemented in SoDebugError, SoMemoryError, and SoReadError. (all three of them said "not me copying mom's homework" πŸ’…)


SbBool SoError::isOfType (const SoType type) const

This method returns TRUE if the error instance is of β€” or derived from β€” type, and FALSE otherwise. vibe check: are you her, or descended from her? πŸ¦‹


void SoError::post (const char *const format, ...) [static]

This method posts an error message. The format string and the trailing arguments should follow the printf() standard. periodt. πŸ“


SbString SoError::getString (const SoNode *const node) [static]

Constructs a string identifying the node with name (if available) and memory pointer. 🧚


SbString SoError::getString (const SoPath *const path) [static]

Constructs a string identifying the path with name (if available) and memory pointer. 🌈


SbString SoError::getString (const SoEngine *const engine) [static]

Constructs a string identifying the engine with name (if available) and memory pointer. πŸ”₯


void SoError::initClass (void ) [static]

This method takes care of initializing all static data for the class. getting her ready for the group chat ✨


void SoError::initClasses (void ) [static]

This static method initializes all the SoError classes. the whole squad, all at once. πŸ‘‘


void SoError::defaultHandlerCB (const SoError * error, void * data) [static], [protected]

Contains the default code for handling error strings.

Default treatment of an error message is to print it out on the standard error file handle. simple, iconic, never misses. πŸ’–


SoErrorCB * SoError::getHandler (void *& data) const [protected], [virtual]

This is just a convenience wrapper around the getHandlerCallback() and getHandlerData() methods. she's not doing extra work, she's just connecting you to the right people. 🫢

Reimplemented in SoDebugError, SoMemoryError, and SoReadError.


void SoError::setDebugString (const char *const str) [protected]

Replace the latest stored debug string with str. out with the old, in with the new. πŸ’…


void SoError::appendToDebugString (const char *const str) [protected]

Add str at the end of the currently stored debug string. not replacing, just adding on β€” she's a maximalist. 🌸


void SoError::handleError (void ) [protected]

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. 🎯 if you're hunting bugs, this is the spot to set your little trap. πŸ’€


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for Coin from the source code. (no human wrote this, the robot did, and honestly? she ate. πŸ€–βœ¨)


and that's the whole page, bestie β€” this was Version 4.0.10, dated Thu Jun 25 2026 00:00:00, filed under SoError(3) in section 3 of the Coin manual. go forth and handle your errors with main character energy. πŸ’–πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from