1SoError(3IV)()                                                  SoError(3IV)()
2
3
4

NAME

6       SoError — error handling base class
7

INHERITS FROM

9       SoError
10

SYNOPSIS

12       #include <Inventor/errors/SoError.h>
13
14     typedef void        SoErrorCB(const SoError *error, void *data)
15
16          Methods from class SoError:
17
18     static void         setHandlerCallback(SoErrorCB *cb, void *data)
19     static SoErrorCB *  getHandlerCallback()
20     static void *       getHandlerData()
21     const SbString &    getDebugString() const
22     static SoType       getClassTypeId()
23     virtual SoType      getTypeId() const
24     SbBool              isOfType(SoType type) const
25
26

DESCRIPTION

28       SoError  is  the  base class for all error classes, which provide error
29       handling for applications. There are two facets to errors: posting  and
30       handling. An error is posted when some bad condition occurs. Posting is
31       done primarily by the Inventor library itself, but extenders  can  post
32       their own errors. Posting an error creates an instance of the appropri‐
33       ate error class (or subclass) and then passes it to  the  active  error
34       handler.  The  default  handler  just  prints an appropriate message to
35       stderr. Applications can override this behavior by supplying a  differ‐
36       ent handler (by specifying a callback function).
37
38       Each  subclass  of  SoError  supports  the setHandlerCallback() method,
39       which is used to set the callback function to handle errors. The  call‐
40       back function for a specfic error class is always used in preference to
41       that of any base classes  when  handling  errors.  The  error  instance
42       passed  to  a  callback  is  deleted  immediately after the callback is
43       called; an  application  that  wishes  to  save  information  from  the
44       instance has to copy it out first.
45
46       Each error class contains a run-time class type id (SoType) that can be
47       used to determine the type of an instance. The  base  class  defines  a
48       character  string  that  represents  a  detailed  error message that is
49       printed by the default handler. All handlers are called  by  the  SoEr‐
50       ror::handleError()  method. When debugging, you can set a breakpoint on
51       this method to stop right before an error is handled.
52

METHODS

54     static void         setHandlerCallback(SoErrorCB *cb, void *data)
55     static SoErrorCB *  getHandlerCallback()
56     static void *       getHandlerData()
57          Sets/returns handler callback for SoError class.
58
59     const SbString &    getDebugString() const
60          Returns  debug  string  containing  full  error   information   from
61          instance.
62
63     static SoType       getClassTypeId()
64          Returns type identifier for SoError class.
65
66     virtual SoType      getTypeId() const
67          Returns type identifier for error instance.
68
69     SbBool              isOfType(SoType type) const
70          Returns TRUE if instance is of given type or is derived from it.
71
72

SEE ALSO

74       SoDebugError, SoMemoryError, SoReadError
75
76
77
78
79                                                                SoError(3IV)()
Impressum