When you catch an exception to throw a new higher-level one, make sure to set the original exception as the cause. 

es.uniovi.reflection.analyses.bloch.9.61.2


This rule detects methods that may throw a checked exception whose particular type is not explicitly declared in the throws clause (because a supertype is declared to be thrown instead).All the particular types of checked exception that may be thrown in a method must be declared in its signature.

Computational Reflection Research Group
01-05-2026 13:28
Bad Practice
Throw Statement