Sometimes you want the analyzer to ignore certain exceptions per project basis. You also might want softer warnings about exceptions that might but are are unlikely to occur - especially if you are a library author.
Add configuration via a file such as this: CheckedExceptions.config.json:
Ignored exceptions will be ignored and not reported on.
Information exceptions
Informational exceptions will report separately but not be enforced to be checked by the analyzer:
private static readonly DiagnosticDescriptor RuleIgnoredException = new DiagnosticDescriptor(
"THROW002",
"Ignored exception may cause runtime issues",
"Exception '{0}' is ignored by configuration but may cause runtime issues if unhandled",
"Usage",
DiagnosticSeverity.Info,
isEnabledByDefault: true);
This will make it possible to distinguish categories of exceptions. So that if you want to enforce THROW001 as error, you can still have soft warnings for certain exceptions.
Sometimes you want the analyzer to ignore certain exceptions per project basis. You also might want softer warnings about exceptions that might but are are unlikely to occur - especially if you are a library author.
Add configuration via a file such as this:
CheckedExceptions.config.json
:Ignored exceptions
Ignored exceptions will be ignored and not reported on.
Information exceptions
Informational exceptions will report separately but not be enforced to be checked by the analyzer:
This will make it possible to distinguish categories of exceptions. So that if you want to enforce
THROW001
as error, you can still have soft warnings for certain exceptions.