Err.GetException Method


Err.GetException Method

Class

Microsoft.VisualBasic.ErrObject

Syntax

     Dim result As System.Exception = Err.GetException(  ) 

Description

The GetException method returns the System.Exception object associated with the current error.

Usage at a Glance

  • If there is no exception, the method returns Nothing.

  • An Exception object is automatically supplied when using structured exception handling (the try...Catch...Finally statement), but the traditional Visual Basic error-handling code relies on the Err object. The GetException method lets you use elements of both types of error handling.

Version Differences

The GetException method is new to VB under .NET.

See Also

Err Object, Exception Class




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net