// Source https://dev.eclipse.org/sonar/rules/show/squid:S00112 // Using such generic exception prevents calling methods from // handling differently each kind of error. // The following code snippet illustrates this rule: public void foo(String bar) throws Throwable { // Non-Compliant throw new RuntimeException("My Message"); // Non-Compliant } public void foo(String bar) { throw new MyRuntimeException("My Message"); // Compliant }