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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.