Using such generic exceptions as Error, RuntimeException, Throwable, and Exception prevents calling methods from handling true, system-generated exceptions differently than application-generated errors.
public void foo(String bar) throws Throwable { // Non-Compliant
throw new RuntimeException("My Message"); // Non-Compliant
}
public void foo(String bar) {
throw new MyOwnRuntimeException("My Message");
}
Generic exceptions in the signatures of overriding methods are ignored.
@Override
public void myMethod() throws Exception {...}