Fix PMD dogfood: AvoidCatchingThrowable

Refs #361
This commit is contained in:
Andreas Dangel
2018-02-13 13:34:20 +01:00
parent 4ace14899c
commit 7aaa9966c2
3 changed files with 36 additions and 30 deletions

View File

@@ -138,9 +138,9 @@ public abstract class RuleTst {
report = processUsingStringReader(test, rule);
res = report.size();
} catch (Throwable t) {
t.printStackTrace();
throw new RuntimeException('"' + test.getDescription() + "\" failed", t);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException('"' + test.getDescription() + "\" failed", e);
}
if (test.getNumberOfProblemsExpected() != res) {
printReport(test, report);