---
title: Introduction to Exception Programming Topics for Cocoa
framework: cocoa
role: article
path: apple-archive/documentation/Cocoa/Conceptual/Exceptions
---

# Introduction to Exception Programming Topics for Cocoa

Explains how to raise and handle exceptions in Cocoa applications.

## Organization of This Document

This document contains the following articles:

- [Exceptions and the Cocoa Frameworks](Articles/ExceptionsAndCocoaFrameworks.html#//apple_ref/doc/uid/TP40009045-SW1) describes `NSException` objects and their general use with the Cocoa frameworks. - [Handling Exceptions](Tasks/HandlingExceptions.html#//apple_ref/doc/uid/20000059-BBCHGJIJ) describes how to handle an exception using the compiler directives `@try`, `@catch`, and `@finally`. - [Throwing Exceptions](Tasks/RaisingExceptions.html#//apple_ref/doc/uid/20000058-BBCCFIBF) describes how to throw (raise) an exception. - [Nesting Exception Handlers](Tasks/NestingExceptionHandlers.html#//apple_ref/doc/uid/20000060-CJBBFDIF) describes how exception handlers can be nested. - [Predefined Exceptions](Concepts/PredefinedExceptions.html#//apple_ref/doc/uid/20000057-BCIGHECA) describes where to find exceptions defined by Cocoa. - [Uncaught Exceptions](Concepts/UncaughtExceptions.html#//apple_ref/doc/uid/20000056-BAJDDGGD) describes what happens to an exception not caught by an exception handler. - [Controlling a Program’s Response to Exceptions](Tasks/ControllingAppResponse.html#//apple_ref/doc/uid/20000473-BBCHGJIJ) describes how to use the Exception Handling framework for monitoring and controlling the behavior of Cocoa programs in response to various types of exceptions. - [Exceptions in 64-Bit Executables](Articles/Exceptions64Bit.html#//apple_ref/doc/uid/TP40009044-SW1) describes zero-cost `@try` blocks and C++ interoperability in 64-bit executables.

## See Also

For information on originating, handling, and recovering from expected runtime errors, see *[Error Handling Programming Guide](../ErrorHandlingCocoa/ErrorHandling/ErrorHandling.html#//apple_ref/doc/uid/TP40001806)*. Also see the related document,*[Assertions and Logging Programming Guide](../Assertions/Assertions.html#//apple_ref/doc/uid/10000014i)*, for information on the Foundation framework's support for making assertions and logging error information.

[Next](Articles/ExceptionsAndCocoaFrameworks.html)

Copyright © 2002, 2013 Apple Inc. All Rights Reserved. [Terms of Use](http://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](http://www.apple.com/privacy/) | Updated: 2013-08-08
