About This eBook by Bart De Smet

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

O'Reilly logo

Defining Your Own Exception Types

To signal application- or framework-specific error conditions, you should define your own specialized exception types. Among the most important advantages of using exceptions for error reporting and handling is their nominal nature: The type name contains invaluable information about the kind of error that occurred. Besides this, an exception object can carry any information it wants, which distinguishes it significantly from the Win32 and COM approaches taken in the past. So, you can provide much more context that travels on the back of the exception object, ready for the handler to inspect.

Because it’s important for users of the .NET Framework to feel at home with any kind of exception, guidelines have been ...

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