TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
 
TIOBE - Java Coding Standard
Search

Category: StrictException

Synopsis:These rules provide some strict guidelines about throwing and catching exceptions.


Description:
These rules provide some strict guidelines about throwing and catching exceptions.

Coding Rules

NameCheckedSynopsis
StrictException1 Checked automatically with code checker A catch statement should never catch throwable since it includes errors
StrictException2 Checked automatically with code checker A method/constructor shouldn't explicitly throw java.lang.Exception
StrictException3 Checked automatically with code checker Avoid using exceptions as flow control
StrictException4 Checked automatically with code checker Avoid catching NullPointerException; consider removing the cause of the NPE
StrictException5 Checked automatically with code checker Avoid throwing raw exception types
StrictException6 Checked automatically with code checker Avoid throwing null pointer exceptions
StrictException7 Checked automatically with code checker A catch statement that catches an exception only to rethrow it should be avoided
StrictException8 Use the try-with-resources statement to ensure resources are closed
StrictException100 Checked automatically with code checker Don't ignore exceptions.
StrictException101 Checked automatically with code checker Don't catch generic exceptions.
StrictException102 Checked automatically with code checker Exception classes should only contain final fields