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

Next Page > Hide TOC

Introduction to Assertions and Logging

Contents:

Organization of This Document


Assertions are mechanisms that print error messages and raise exceptions when a given condition in code is false. Logging prints error or informational messages, typically to the standard error device.

Limitations: This programming topic applies only to programs written in Objective-C. In Java there is no equivalent to assertions. For logging in Java, you can simply print messages to the standard error device or use the NSSystem method log.

Organization of This Document

This programming topic covers exception handling insofar as it relates to evaluations of given conditions and the logging of messages. For more sophisticated exception handling, namely techniques involving the raising (or throwing) and handling of exception objects, see Exceptions.

The articles covered in this programming topic are:



Next Page > Hide TOC


Last updated: 2006-04-04




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