Chapter 7. Understanding Structured Exception Handling

The point of this chapter is to understand how to handle runtime anomalies in your C# code base through the use of structured exception handling. Not only will you learn about the C# keywords that allow you to handle such matters (try, catch, throw, finally), but you will also come to understand the distinction between application-level and system-level exceptions and learn the role of the System.Exception base class. This discussion will also provide a lead-in to the topic of building custom exceptions, as well as how to leverage the exception-centric debugging tools of Visual Studio 2008.

Ode to Errors, Bugs, and Exceptions

Despite what our (sometimes inflated) egos may tell us, no programmer ...

Get Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition 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.