ErrObject.GetException Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the exception representing the error that occurred.
public:
Exception ^ GetException();
public Exception? GetException ();
public Exception GetException ();
member this.GetException : unit -> Exception
Public Function GetException () As Exception
Returns
The exception representing the error that occurred.
Examples
The following code displays the message assigned to the exception in the Err
object:
On Error Resume Next
Dim myError As System.Exception
' Generate an overflow exception.
Err.Raise(6)
' Assigns the exception from the Err object to myError.
myError = Err.GetException()
' Displays the message associated with the exception.
MsgBox(myError.Message)
Remarks
The GetException
function is available only from the Err
object class. It works with the Exception
property of the Err
object to display the error that has occurred.
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.