O'Reilly logo

Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition by Harvey M. Deitel - Deitel & Associates, Inc., Paul J. Deitel - Deitel & Associates, Inc.

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

12.5. .NET Exception Hierarchy

In Visual Basic, the exception-handling mechanism allows only objects of class Exception (namespace System) and its derived classes to be thrown and caught. Visual Basic programs may interact with software components written in other .NET languages (such as C++) that do not restrict exception types. Such exceptions are wrapped by the CLR as Exception objects, so they can be caught by a Catch clause of type Exception.

This section overviews several of the .NET Framework’s exception classes and focuses exclusively on exceptions that derive from class Exception. In addition, we discuss how to determine whether a particular method throws exceptions.

12.5.1. Classes ApplicationException and SystemException

Class Exception ...

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