TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C# Coding Standard
Search

Category: Exceptions

Synopsis:Exceptions


Description:

Coding Rules

NameCheckedSynopsis
8@101 Only throw exceptions in exceptional situations
8@102 Checked automatically with code checker Do not throw exceptions from unexpected locations
8@103 Only re-throw exceptions when you want to specialize the exception
8@104 List the explicit exceptions a method or property can throw
8@105 Always log that an exception is thrown
8@106 Allow callers to prevent exceptions by providing a method or property that returns the object's state
8@107 Checked automatically with code checker Use standard exceptions
8@108 Throw informational exceptions
8@109 Throw the most specific exception possible
8@110 Checked automatically with code checker Do not silently ignore exceptions
8@111 Throw exceptions rather than returning some kind of status value
8@201 Checked automatically with code checker Derive custom exceptions from ApplicationException
8@202 Checked automatically with code checker Provide common constructors for custom exceptions
8@203 Avoid side-effects when throwing recoverable exceptions
8@204 Checked automatically with code checker Do not throw an exception from inside an exception constructor