TargetInvocationException 생성자

정의

TargetInvocationException 클래스의 새 인스턴스를 초기화합니다.

오버로드

TargetInvocationException(Exception)

이 예외의 원인인 내부 예외에 대한 참조를 사용하여 TargetInvocationException 클래스의 새 인스턴스를 초기화합니다.

TargetInvocationException(String, Exception)

지정된 오류 메시지와 해당 예외의 원인인 내부 예외에 대한 참조를 사용하여 TargetInvocationException 클래스의 새 인스턴스를 초기화합니다.

TargetInvocationException(Exception)

Source:
TargetInvocationException.cs
Source:
TargetInvocationException.cs
Source:
TargetInvocationException.cs

이 예외의 원인인 내부 예외에 대한 참조를 사용하여 TargetInvocationException 클래스의 새 인스턴스를 초기화합니다.

public:
 TargetInvocationException(Exception ^ inner);
public TargetInvocationException (Exception inner);
public TargetInvocationException (Exception? inner);
new System.Reflection.TargetInvocationException : Exception -> System.Reflection.TargetInvocationException
Public Sub New (inner As Exception)

매개 변수

inner
Exception

현재 예외의 원인인 예외입니다. inner 매개 변수가 null이 아니면 현재 예외는 내부 예외를 처리하는 catch 블록에서 발생합니다.

설명

이전 예외의 직접적인 결과로 throw되는 예외의 InnerException 속성에는 이전 예외에 대한 참조가 들어 있어야 합니다. InnerException 속성은 생성자로 전달되는 값과 같은 값을 반환하거나, InnerException 속성이 생성자에 내부 예외 값을 제공하지 않는 경우 null을 반환합니다.

다음 표에는 TargetInvocationException의 인스턴스의 초기 속성 값이 나와 있습니다.

속성
InnerException 내부 예외 참조
Message 오류 메시지 문자열입니다.

추가 정보

적용 대상

TargetInvocationException(String, Exception)

Source:
TargetInvocationException.cs
Source:
TargetInvocationException.cs
Source:
TargetInvocationException.cs

지정된 오류 메시지와 해당 예외의 원인인 내부 예외에 대한 참조를 사용하여 TargetInvocationException 클래스의 새 인스턴스를 초기화합니다.

public:
 TargetInvocationException(System::String ^ message, Exception ^ inner);
public TargetInvocationException (string message, Exception inner);
public TargetInvocationException (string? message, Exception? inner);
new System.Reflection.TargetInvocationException : string * Exception -> System.Reflection.TargetInvocationException
Public Sub New (message As String, inner As Exception)

매개 변수

message
String

예외에 대한 이유를 설명하는 오류 메시지입니다.

inner
Exception

현재 예외의 원인인 예외입니다. inner 매개 변수가 null이 아니면 현재 예외는 내부 예외를 처리하는 catch 블록에서 발생합니다.

설명

이전 예외의 직접적인 결과로 throw되는 예외의 InnerException 속성에는 이전 예외에 대한 참조가 들어 있어야 합니다. InnerException 속성은 생성자로 전달되는 값과 같은 값을 반환하거나, InnerException 속성이 생성자에 내부 예외 값을 제공하지 않는 경우 null을 반환합니다.

다음 표에는 TargetInvocationException의 인스턴스의 초기 속성 값이 나와 있습니다.

속성
InnerException 내부 예외 참조
Message 오류 메시지 문자열입니다.

추가 정보

적용 대상