ErrObject.GetException 메서드

정의

발생한 오류를 나타내는 예외를 반환합니다.

public:
 Exception ^ GetException();
public Exception GetException();
member this.GetException : unit -> Exception
Public Function GetException () As Exception

반품

발생한 오류를 나타내는 예외입니다.

예제

다음 코드는 개체의 예외 Err 에 할당된 메시지를 표시합니다.

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)

설명

GetException 함수는 개체 클래스에서 Err 만 사용할 수 있습니다. 개체의 ExceptionErr 속성과 함께 작동하여 발생한 오류를 표시합니다.

적용 대상

추가 정보