WarningException クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
エラーではなく警告として処理される例外を指定します。
public ref class WarningException : SystemException
public class WarningException : SystemException
[System.Serializable]
public class WarningException : SystemException
type WarningException = class
inherit SystemException
[<System.Serializable>]
type WarningException = class
inherit SystemException
Public Class WarningException
Inherits SystemException
- 継承
- 属性
例
次のコード例は、警告をキャッチしてその警告メッセージを解釈する方法を示しています。
WarningException^ myEx = gcnew WarningException( "This is a warning" );
Console::WriteLine( myEx->Message );
Console::WriteLine( myEx->ToString() );
WarningException myEx=new WarningException("This is a warning");
Console.WriteLine(myEx.Message);
Console.WriteLine(myEx.ToString());
Dim myEx As New WarningException("This is a warning")
Console.WriteLine(myEx.Message)
Console.WriteLine(myEx.ToString())
注釈
この例外がキャッチされない場合、ユーザーには警告メッセージとして表示されます。 コンストラクターでは WarningException 、ユーザーが詳細情報を要求した場合に表示するヘルプ ファイルとヘルプ トピックを指定できます。
コンストラクター
| WarningException() |
WarningException クラスの新しいインスタンスを初期化します。 |
| WarningException(SerializationInfo, StreamingContext) |
古い.
指定したシリアル化データとコンテキストを使用して、WarningException クラスの新しいインスタンスを初期化します。 |
| WarningException(String) |
指定したメッセージを使用し、ヘルプ ファイルは指定せずに WarningException クラスの新しいインスタンスを初期化します。 |
| WarningException(String, Exception) |
詳細説明と例外を指定して、WarningException クラスの新しいインスタンスを初期化します。 |
| WarningException(String, String) |
指定したメッセージを用意し、特定のヘルプ ファイルにアクセスできるように指定して、WarningException クラスの新しいインスタンスを初期化します。 |
| WarningException(String, String, String) |
指定したメッセージを用意し、指定したヘルプ ファイルやヘルプ トピックへアクセスできるようにして、WarningException クラスの新しいインスタンスを初期化します。 |
プロパティ
| Data |
例外に関する追加のユーザー定義情報を提供する、キーと値のペアのコレクションを取得します。 (継承元 Exception) |
| HelpLink |
この例外に関連付けられているヘルプ ファイルへのリンクを取得または設定します。 (継承元 Exception) |
| HelpTopic |
警告に関連付けられているヘルプ トピックを取得します。 |
| HelpUrl |
警告に関連付けられているヘルプ ファイルを取得します。 |
| HResult |
特定の例外に割り当てられているコード化数値である HRESULT を取得または設定します。 (継承元 Exception) |
| InnerException |
現在の例外の原因となる Exception インスタンスを取得します。 (継承元 Exception) |
| Message |
現在の例外を説明するメッセージを取得します。 (継承元 Exception) |
| Source |
エラーの原因となるアプリケーションまたはオブジェクトの名前を取得または設定します。 (継承元 Exception) |
| StackTrace |
呼び出し履歴で直前のフレームの文字列形式を取得します。 (継承元 Exception) |
| TargetSite |
現在の例外がスローされたメソッドを取得します。 (継承元 Exception) |
メソッド
| Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetBaseException() |
派生クラスでオーバーライドされた場合、それ以後に発生する 1 つ以上の例外の根本原因である Exception を返します。 (継承元 Exception) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetObjectData(SerializationInfo, StreamingContext) |
古い.
パラメーター名と追加の例外情報を使用して SerializationInfo を設定します。 |
| GetObjectData(SerializationInfo, StreamingContext) |
古い.
派生クラスでオーバーライドされた場合は、その例外に関する情報を使用して SerializationInfo を設定します。 (継承元 Exception) |
| GetType() |
現在のインスタンスのランタイム型を取得します。 (継承元 Exception) |
| MemberwiseClone() |
現在の Object の簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在の例外の文字列形式を作成して返します。 (継承元 Exception) |
イベント
| SerializeObjectState |
古い.
例外がシリアル化され、例外に関するシリアル化されたデータを含む例外状態オブジェクトが作成されたときに発生します。 (継承元 Exception) |