Click or drag to resize
SoError Class

Error handling base class.

Inheritance Hierarchy

Namespace: OIV.Inventor.Errors
Assembly: OIV.Inventor.Base (in OIV.Inventor.Base.dll) Version: 2024.1.0.0 (2024.1.0)
Syntax
public class SoError : SoNetBase

The SoError type exposes the following members.

Constructors
  NameDescription
Public methodSoError
Default constructor.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetDebugString

Returns debug string containing full error information from instance.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberPost

Posts an error.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyStatic memberHandlerCallback

Sets handler callback for OIV.Inventor.Errors.SoError class.

Top
Remarks

OIV.Inventor.Errors.SoError is the base class for all error classes, which provide error handling for applications. There are two facets to errors: posting and handling. An error is posted when some bad condition occurs. Posting is done primarily by the Open Inventor library itself, but extenders can post their own errors. Posting an error creates an instance of the appropriate error class (or subclass) and then passes it to the active error handler. The default handler just prints an appropriate message to stderr. Applications can override this behavior by supplying a different handler (by specifying a delegate). Some implementations of the Open Inventor window system specific layer provide alternate ways to display an error message, for example OIV.Inventor.Win.SoConsole.

Each subclass of OIV.Inventor.Errors.SoError supports the OIV.Inventor.Errors.SoError.HandlerCallback method, which is used to set the delegateto handle errors. The delegatefor a specific error class is always used in preference to that of any base classes when handling errors. The error instance passed to a delegateis disposed immediately after the delegateis called; an application that wishes to save information from the instance has to copy it out first.

Each error class contains a run-time class type id (SoType) that can be used to determine the type of an instance. The base class defines a character string that represents a detailed error message that is printed by the default handler. All handlers are called by the SoError.handleError() method. When debugging, you can set a breakpoint on this method to stop right before an error is handled.

See Also