Skip to content
Permalink
Browse files

[JENKINS-51465] Exception in XSL Transformation cause JEP-200

Change the converter to no more include ConversionException as cause to avoid JEP-200 issue. Only exception message or its root message is collected.
  • Loading branch information
Nikolas Falco
Nikolas Falco committed Jun 6, 2018
1 parent 5dff992 commit 5149c4e47ad976faf1a1162a88b4f10ecd2c0242
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/main/java/org/jenkinsci/plugins/xunit/service/XUnitConversionService.java
@@ -84,8 +84,11 @@ public File convert(XUnitToolInfo xUnitToolInfo, File inputFile, File junitOutpu
inputMetric.convert(inputFile, junitTargetFile);
return junitTargetFile;

} catch (ConversionException | InterruptedException | IOException e) {
throw new XUnitException("Conversion error " + e.getMessage(), e);
} catch (ConversionException e) {
Throwable cause = e.getCause();
throw new XUnitException("Conversion error: " + (cause != null ? cause.getMessage() : e.getMessage()));
} catch (InterruptedException | IOException e) {
throw new XUnitException("Conversion error: " + e.getMessage(), e);
}
}

0 comments on commit 5149c4e

Please sign in to comment.
You can’t perform that action at this time.