CSENSE012 - Missing Exception Documentation
Severity: WarningCategory: Documentation
Code Fix: Yes (generates
<exception> placeholder, offers rename if similar exception found)
Description
Scans the method body for explicitly thrown exceptions (including static guard clauses likeArgumentNullException.ThrowIfNull) and ensures they are documented with <exception> tags.
When it triggers
Examples that trigger CSENSE012
Examples that trigger CSENSE012
Correct examples
Correct examples
Special cases
Caught exceptions
Caught exceptions
Rethrown exceptions
Rethrown exceptions
Base class exceptions
Base class exceptions
Exceptions in local functions and lambdas
Exceptions in local functions and lambdas
Configuration
Ignore specific exceptions
Ignore specific exceptions
Ignore all System exceptions
Ignore all System exceptions
Ignore exceptions by namespace
Ignore exceptions by namespace
Scan called methods for exceptions
Scan called methods for exceptions
Fuzzy match threshold for rename suggestions
Fuzzy match threshold for rename suggestions
CSENSE017 - Invalid Exception Type
Severity: WarningCategory: Documentation
Code Fix: No
Description
Validates that thecref attribute in an <exception> tag refers to a valid Exception type.
When it triggers
Examples that trigger CSENSE017
Examples that trigger CSENSE017
Correct examples
Correct examples
CSENSE023 - Stray Exception Documentation
Severity: WarningCategory: Documentation
Code Fix: Yes (removes stray tags)
Description
Flags<exception> tags that are nested within other tags or duplicated for the same exception type.
When it triggers
Examples that trigger CSENSE023
Examples that trigger CSENSE023
Correct examples
Correct examples