diff --git a/pmd/src/net/sourceforge/pmd/PMD.java b/pmd/src/net/sourceforge/pmd/PMD.java index e4e478ab13..008952926f 100644 --- a/pmd/src/net/sourceforge/pmd/PMD.java +++ b/pmd/src/net/sourceforge/pmd/PMD.java @@ -115,7 +115,7 @@ public class PMD { try { pmd.processFile(new FileInputStream(file), rules, ctx); } catch (PMDException pmde) { - pmde.printStackTrace(); + ctx.getReport().addError(new Report.ProcessingError(pmde.getMessage(), file.getAbsolutePath())); } } } catch (FileNotFoundException fnfe) {