<exception>(Visual Basic)

throw될 수 있는 예외를 지정합니다.

구문

<exception cref="member">description</exception>  

매개 변수

member
현재 컴파일 환경에서 사용할 수 있는 예외에 대한 참조입니다. 컴파일러는 지정된 예외가 있으며 member를 출력 XML의 정식 요소 이름으로 변환하는지 확인합니다. member는 큰따옴표(" ")로 묶어야 합니다.

description
설명.

설명

throw될 수 있는 예외를 지정하려면 <exception> 태그를 사용합니다. 이 태그는 메서드 정의에 적용됩니다.

-doc로 컴파일하여 문서 주석을 파일로 처리합니다.

예시

이 예에서는 <exception> 태그를 사용하여 IntDivide 함수가 throw될 수 있는 예외를 설명합니다.

''' <exception cref="System.OverflowException">
''' Thrown when <paramref name="denominator"/><c> = 0</c>.
''' </exception>
Public Function IntDivide(
        ByVal numerator As Integer,
        ByVal denominator As Integer
) As Integer
    Return numerator \ denominator
End Function

참고 항목