Share via


ProtocolException 생성자

정의

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

오버로드

ProtocolException()

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

ProtocolException(String)

지정된 오류 메시지를 사용하여 ProtocolException 클래스의 새 인스턴스를 초기화합니다.

ProtocolException(SerializationInfo, StreamingContext)

지정된 serialization 정보와 스트리밍 컨텍스트를 사용하여 ProtocolException 클래스의 새 인스턴스를 초기화합니다.

ProtocolException(String, Exception)

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

설명

사용자에게 오류 메시지를 전달하려면 ProtocolException(String) 생성자를 사용합니다.

사용자에게 오류 메시지 및 예외의 원인인 내부 예외에 대한 참조를 전달하려면 ProtocolException(String, Exception) 생성자를 사용합니다.

serialization 정보와 스트리밍 컨텍스트를 전달하려면 ProtocolException(SerializationInfo, StreamingContext) 생성자를 사용합니다.

ProtocolException()

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

public:
 ProtocolException();
public ProtocolException ();
Public Sub New ()

적용 대상

ProtocolException(String)

지정된 오류 메시지를 사용하여 ProtocolException 클래스의 새 인스턴스를 초기화합니다.

public:
 ProtocolException(System::String ^ message);
public ProtocolException (string message);
new System.ServiceModel.ProtocolException : string -> System.ServiceModel.ProtocolException
Public Sub New (message As String)

매개 변수

message
String

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

설명

사용자에게 오류 메시지를 전달하려면 이 생성자를 사용합니다. 메시지 매개 변수의 내용은 사용자가 이해할 수 있는 것이어야 합니다. 현재 시스템 culture에 대해 이 문자열이 지역화되었는지 확인하려면 이 생성자의 호출자가 필요합니다.

지정된 오류 메시지뿐 아니라 예외의 원인인 내부 예외에 참조를 전달하려는 경우에도 ProtocolException(String, Exception) 생성자를 사용합니다.

적용 대상

ProtocolException(SerializationInfo, StreamingContext)

지정된 serialization 정보와 스트리밍 컨텍스트를 사용하여 ProtocolException 클래스의 새 인스턴스를 초기화합니다.

protected:
 ProtocolException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ProtocolException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.ServiceModel.ProtocolException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ServiceModel.ProtocolException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

매개 변수

info
SerializationInfo

예외를 serialize하는 데 필요한 모든 데이터를 포함하는 SerializationInfo입니다.

context
StreamingContext

스트림의 소스 및 대상을 지정하는 StreamingContext입니다.

설명

deserialization을 수행하는 동안 이 생성자를 호출하여 스트림을 통해 전송되는 예외 개체를 다시 생성합니다.

적용 대상

ProtocolException(String, Exception)

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

public:
 ProtocolException(System::String ^ message, Exception ^ innerException);
public ProtocolException (string message, Exception innerException);
new System.ServiceModel.ProtocolException : string * Exception -> System.ServiceModel.ProtocolException
Public Sub New (message As String, innerException As Exception)

매개 변수

message
String

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

innerException
Exception

현재 예외가 throw된 원인인 Exception입니다.

설명

사용자에게 내부 예외에 관한 정보 및 오류 메시지를 전달하려면 이 생성자를 사용합니다. 메시지 매개 변수의 내용은 사용자가 이해할 수 있는 것이어야 합니다.

이전 예외의 직접적인 결과로 throw되는 예외는 InnerException 속성에 이전 예외에 대한 참조를 포함할 수 있습니다. InnerException 속성은 생성자에 전달된 것과 동일한 값을 반환하거나, null 속성이 내부 예외 값을 생성자에 전달하지 않는 경우 Nothing 참조(Visual Basic의 경우 InnerException)를 반환합니다.

적용 대상