Skip to main content

Table 1 Exception handling anti-patterns [15]

From: Studying the evolution of exception handling anti-patterns in a long-lived large-scale project

Unhandled ExceptionsException handling does not capture all possible exceptions thrown in a try block.
Unreachable HandlerException handling code will never run.
Catch GenericException handling captures many low-level exceptions by setting a high-level exception.
Destructive WrappingThe developer propagates an exception as if it were another one. It causes loss of information regarding the original exception.
Catch and Do NothingCatch block code is empty.
Dummy HandlerThe Exception handling code has no actions to recover errors.
Ignoring Interrupted ExceptionCaught exception is ignored in the catch block.
Throw withing FinallyThe code throws an exception within a finally block.
Generic ThrowThe code throws a generic exception.