Chapter 12. Exception Handling

Exception handling helps applications trap and respond in a predictable and robust manner to exceptional events. This enhances the correctness of an application, which naturally improves customer satisfaction. Exception handling is an important ingredient of a robust application, but it is often an afterthought. You should proactively consider exception handling as an integral part of the application design and include it in all aspects of application planning and development. Conversely, treating exception handling as an afterthought leads to poorly implemented solutions for exception handling and a less robust application.

What is an exception? Exceptions are events, often indicating an error, that alter the normal ...

Get Programming Microsoft® Visual C#® 2008: The Language 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.