See: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSException_Class/index.html
See also: ExceptionHandling
Note:
We have some sample code for generating StackTraces from an NSException.
If you’re looking for a way to find out where your program is throwing an exception, see “Breaking on Exceptions” on the DebuggingTechniques page.