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.


Exception Handling Error Code Error Handling Runtime Error Main Thread 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© James Bucanek 2009

Personalised recommendations