指定したエラー メッセージと、この例外の原因である内部例外への参照を使用して、PolicyException クラスの新しいインスタンスを初期化します。
名前空間: System.Security.Policy
アセンブリ: mscorlib (mscorlib.dll 内)
構文
'宣言
Public Sub New ( _
message As String, _
exception As Exception _
)
'使用
Dim message As String
Dim exception As Exception
Dim instance As New PolicyException(message, exception)
public PolicyException (
string message,
Exception exception
)
public:
PolicyException (
String^ message,
Exception^ exception
)
public PolicyException (
String message,
Exception exception
)
public function PolicyException (
message : String,
exception : Exception
)
適用できません。
パラメータ
- message
例外の原因を説明するエラー メッセージ。
- exception
現在の例外の原因である例外。exception パラメータが null 参照 (Visual Basic では Nothing) ではない場合、現在の例外は内部例外を処理する catch ブロックで発生します。
解説
前の例外の直接の結果としてスローされる例外については、InnerException プロパティに、前の例外への参照が格納されます。InnerException プロパティは、コンストラクタに渡されたものと同じ値を返します。InnerException プロパティによって内部例外値がコンストラクタに渡されなかった場合は、null 参照 (Visual Basic では Nothing) を返します。
PolicyException のインスタンスの初期プロパティ値を次の表に示します。
プロパティ |
値 |
|---|---|
InnerException |
内部例外参照 |
エラー メッセージ文字列。 |
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0
参照
関連項目
PolicyException クラス
PolicyException メンバ
System.Security.Policy 名前空間
Exception