

3D Graphics Programming with QuickDraw 3D
19 About the Error Manager
QuickDraw3D defines several levels of exceptional conditions that can occur during the execution of QuickDraw3D routines. An exceptional condition can be an error, a warning, or a notice, depending on the severity of the exceptional condition.
- An error is a nonrecoverable condition that causes the currently executing QuickDraw3D routine to fail. A fatal error is an error whose effects persist even after the call that caused it has ended. Once a fatal error has occurred, all future calls to QuickDraw3D routines are likely to fail. Whether future calls actually do fail depends on whether those calls are suitably related to the call that generated the fatal error. For example, even if a fatal error occurs during rendering, you might still be able to perform file operations (perhaps to save the data that couldn't be rendered).
- A warning is a condition that, although less severe than an error, might cause an error if your application continues execution without handling
the warning.
- A notice is a condition that is less severe than a warning and will likely not cause problems. In general, notices indicate inefficiencies or other small problems in using QuickDraw3D.
QuickDraw3D notifies your application of errors, warnings, and notices by executing application-defined callback routines you have previously registered with the Error Manager. Once a callback routine is registered, QuickDraw3D calls it whenever the appropriate condition occurs.
Notices are generated only by debugging versions
of the QuickDraw3D shared library.<8bat>s
You register a callback routine by passing its address to the Q3Error_Register
, Q3Warning_Register
, or Q3Notice_Register
function, depending on whether the callback routine is to handle errors, warnings, or notices. If you do not register a callback routine for errors, the Error Manager calls an internal error handler that attempts to handle the exception. The manner in which the exception handler handles that error can vary, depending on the operating system. For example, on the Macintosh Operating System, the internal exception handler of the debugging version calls the DebugStr
function.
3D Graphics Programming with QuickDraw 3D - 17 OCT 1995© Apple Computer, Inc.


Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker