Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Handling Errors

Mostly in the interest of code simplification, Core Foundation functions do not follow the Mac OS OSErr convention for error reporting. However, if you rigorously test your program with the debug version of the Core Foundation library (or framework), then the possibilities for error are much reduced.

Yet there can be occasions when you want to test whether a function succeeds in its intended purpose and proceed conditionally from there. By a common-sense interpretation of returned values (and sometimes by a quick check of the reference documentation), you can usually determine the reason for failure, as in these examples:

Some Core Foundation functions return a value of type Boolean or an enum constant or some other explicitly typed indication of the reason for an outcome. Consult the Core Foundation reference documentation for an explanation of these return values.



< Previous PageNext Page > Hide TOC


Last updated: 2003-01-17




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice