O'Reilly logo

CLR via C#, 3rd Edition by Jeffrey Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 20. Exceptions and State Management

In this chapter:

Defining "Exception" 466

Exception-Handling Mechanics 467

The System.Exception Class 474

FCL-Defined Exception Classes 478

Throwing an Exception 480

Defining Your Own Exception Class 481

Trading Reliability for Productivity 484

Guidelines and Best Practices 492

Unhandled Exceptions 500

Debugging Exceptions 504

Exception-Handling Performance Considerations 506

Constrained Execution Regions (CERs) 509

Code Contracts 512

This chapter is all about error handling. But it's not just about that. There are several parts to error handling. First, we'll define what an error actually is. Then, we'll talk about how to discover when your code is experiencing an error and about how to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required