NamespaceSystem CreatableYes DescriptionThe System.Exception class and its inherited (child) classes represent runtime exceptions. When errors occur in the context of a TRy...Catch...Finally statement, an Exception object is made available that describes the exception or runtime error. The following table lists some of the more useful and interesting members of the Exception class.
The System.Exception class is the base class for a substantial collection of derived exception classes. Each class represents a specific exception that can occur in the lifetime of an application. Chapter 11 includes a hierarchical listing of the derived exception classes. Usage at a GlanceIn the Catch clause of a try...Catch...Finally statement, you can trap the generic Exception object, or you can trap a specific exception object descendant if you expect a certain type of error. Version DifferencesThe Exception class, along with structured exception handling, is new to Visual Basic under the .NET platform. See AlsoErr Object |