A.3. Understanding Exception Classes
By now you have a basic idea of how to implement structured exception handling in your code. Now let’s take a quick overview of exception-related classes provided by the .NET Framework library.
A.3.1. The Exception Class: Mother of All Exceptions
The Exception class is the first class we will discuss. It caters to errors that occur during normal application execution. This is the base class for all exception classes. In our previous samples, we have already seen how to use the Exception class. Table A.1 describes its properties.
Listing A.8 uses the Exception class properties to display information about an exception.
Listing A.8. Using Exception properties
// The error within this block try { // Suspect ... |
Get Graphics Programming with GDI+ 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.