C#


ROSLYN.USAGE.CA2201 : Do not raise reserved exception types (C#)

See Roslyn-Detected C# Warning Classes for more information.

要旨

An exception of type that is not sufficiently specific or reserved by the runtime should never be raised by user code. This makes the original error difficult to detect and debug. If this exception instance might be thrown, use a different exception type.

この指摘はRoslynのCA2201に該当します。ルール詳細につい ては、下記リンクを参照してください。 CA2201

プロパティ

クラス名 Do not raise reserved exception types (C#)
日本語クラス名 Do not raise reserved exception types (C#)
クラス分類 信頼性 (reliability)
ニーモニック ROSLYN.USAGE.CA2201
カテゴリー なし
対応言語 C# で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで有効になっています。チェックを無効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += discard class="Do not raise reserved exception types (C#)"

関連のある設定ファイルパラメータ

設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。