ExternalException コンストラクター

定義

ExternalException クラスの新しいインスタンスを初期化します。

オーバーロード

ExternalException()

ExternalException クラスの新しいインスタンスを、既定のプロパティを使用して初期化します。

ExternalException(String)

指定したエラー メッセージを使用して、ExternalException クラスの新しいインスタンスを初期化します。

ExternalException(SerializationInfo, StreamingContext)
古い.

シリアル化データから、ExternalException クラスの新しいインスタンスを初期化します。

ExternalException(String, Exception)

指定したエラー メッセージおよびこの例外の原因となった内部例外への参照を使用して、ExternalException クラスの新しいインスタンスを初期化します。

ExternalException(String, Int32)

ExternalException クラスの新しいインスタンスを、指定したエラー メッセージとエラーの HRESULT を使用して初期化します。

ExternalException()

ソース:
ExternalException.cs
ソース:
ExternalException.cs
ソース:
ExternalException.cs

ExternalException クラスの新しいインスタンスを、既定のプロパティを使用して初期化します。

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

注釈

次の表に、ExternalException のインスタンスに対するプロパティの初期値を示します。

プロパティ
InnerException null 参照 (Visual Basic の場合は Nothing)。
Message ローカライズされたエラー メッセージ文字列。

適用対象

ExternalException(String)

ソース:
ExternalException.cs
ソース:
ExternalException.cs
ソース:
ExternalException.cs

指定したエラー メッセージを使用して、ExternalException クラスの新しいインスタンスを初期化します。

public:
 ExternalException(System::String ^ message);
public ExternalException (string? message);
public ExternalException (string message);
new System.Runtime.InteropServices.ExternalException : string -> System.Runtime.InteropServices.ExternalException
Public Sub New (message As String)

パラメーター

message
String

例外の原因を指定するエラー メッセージ。

注釈

次の表に、ExternalException のインスタンスに対するプロパティの初期値を示します。

プロパティ
InnerException null 参照 (Visual Basic の場合は Nothing)。
Message エラー メッセージ文字列。

適用対象

ExternalException(SerializationInfo, StreamingContext)

ソース:
ExternalException.cs
ソース:
ExternalException.cs
ソース:
ExternalException.cs

注意事項

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

シリアル化データから、ExternalException クラスの新しいインスタンスを初期化します。

protected:
 ExternalException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ExternalException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected ExternalException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Runtime.InteropServices.ExternalException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.ExternalException
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.InteropServices.ExternalException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.ExternalException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

パラメーター

info
SerializationInfo

シリアル化されたオブジェクト データを保持するオブジェクト。

context
StreamingContext

転送元または転送先に関するコンテキスト情報。

属性

例外

infonullです。

注釈

このコンストラクターは、シリアル化解除の際に呼び出されて、ストリームで送信された例外オブジェクトを再構成します。 詳細については、「 XML および SOAP のシリアル化」を参照してください。

適用対象

ExternalException(String, Exception)

ソース:
ExternalException.cs
ソース:
ExternalException.cs
ソース:
ExternalException.cs

指定したエラー メッセージおよびこの例外の原因となった内部例外への参照を使用して、ExternalException クラスの新しいインスタンスを初期化します。

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

パラメーター

message
String

例外の原因を説明するエラー メッセージ。

inner
Exception

現在の例外の原因となった例外。 inner パラメーターが null でない場合は、内部例外を処理する catch ブロックで現在の例外が発生します。

注釈

前の例外の直接の結果としてスローされる例外については、InnerException プロパティに、前の例外への参照を含める必要があります。 InnerException プロパティは、コンストラクターに渡されるのと同じ値を返します。または、InnerException プロパティがコンストラクターに内部例外値を提供しない場合には null を返します。

次の表に、ExternalException のインスタンスに対するプロパティの初期値を示します。

プロパティ [値]
InnerException 内部例外の参照。
Message エラー メッセージ文字列。

こちらもご覧ください

適用対象

ExternalException(String, Int32)

ソース:
ExternalException.cs
ソース:
ExternalException.cs
ソース:
ExternalException.cs

ExternalException クラスの新しいインスタンスを、指定したエラー メッセージとエラーの HRESULT を使用して初期化します。

public:
 ExternalException(System::String ^ message, int errorCode);
public ExternalException (string? message, int errorCode);
public ExternalException (string message, int errorCode);
new System.Runtime.InteropServices.ExternalException : string * int -> System.Runtime.InteropServices.ExternalException
Public Sub New (message As String, errorCode As Integer)

パラメーター

message
String

例外の原因を指定するエラー メッセージ。

errorCode
Int32

エラーの HRESULT。

注釈

次の表に、ExternalException のインスタンスに対するプロパティの初期値を示します。

プロパティ [値]
ErrorCode エラーの HRESULT。
InnerException null 参照 (Visual Basic の場合は Nothing)。
Message エラー メッセージ文字列。

適用対象