ErrObject.GetException 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
발생한 오류를 나타내는 예외를 반환합니다.
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 속성과 함께 작동하여 발생한 오류를 표시합니다.