Hour 21. Handling Exceptions

What You’ll Learn in This Hour

Using exceptions in today’s software

Throwing exceptions

Working with the try/catch/final blocks

Logging incidents

Rethinking Exceptions and Errors

Most programming languages today provide some method for handling exceptions—events that must interrupt the normal flow of processing because that normal flow of processing cannot handle the event that has occurred, such as an attempt to divide a number by zero. Modern exception handling usually provides a structure that lets you react programmatically to the type of error and, if possible, take remedial action.

Compared to software from a decade or longer ago, today’s best software is much less verbose. Instead of reporting each ...

Get Sams Teach Yourself Objective-C in 24 Hours now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.