Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Exception handling in Objective-C is almost identical in capacity with that in Java. Objective-C is, naturally, more casual about exceptions and makes none of the demands that Java does. You can design and write code using Objective-C exceptions exactly as you would in Java, completely ignore them, or settle somewhere in between. This chapter will briefly compare the similarities between Objective-C and Java exception handling—of which there are many—and then explain some of the subtle differences. Later sections will discuss assertions and alternatives to exceptions.