3D Graphics Programming with QuickDraw 3D

19 Using the Error Manager

For each level of exceptional condition (that is, for errors, warnings, and notices), QuickDraw3D keeps track of the first and the most recent exceptional conditions that have occurred since the last time an exceptional condition of that type was posted. For example, when the first error occurs, that error is posted both as the first and as the most recent error. Any subsequent error is posted as the most recent error to occur.

When you call a _Get function to retrieve an error, warning, or notice, the function returns, as its function result, the most recent error, warning, or notice. For example, when you call Q3Error_Get, it returns, as its function result, the most recent error. Q3Error_Get also returns, through its firstError parameter, the oldest unreported error that occurred during a QuickDraw3D routine. You can set this parameter to NULL if you do not care about the oldest unreported error.

The oldest unreported error, warning, or
notice is sometimes called sticky.<8bat>u

Once you've called the Q3Error_Get function to retrieve the most recent and the oldest unreported QuickDraw3D errors, the Error Manager automatically clears those error codes the next time you call a QuickDraw3D function that is not part of the Error Manager.

If an error occurs in the operating system on which QuickDraw3D is running, the Error Manager posts an error indicating which the operating system encountered the error. You can then call an appropriate function to retrieve
the system-specific error. For instance, if an error occurs while reading or writing a file in the Macintosh Operating System, then the Q3Error_Get function returns the error kQ3ErrorMacintoshError. In that case, you can call the Q3MacintoshError_Get function to get the Macintosh-specific error code.


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