Skip to content

Commit f9cad32

Browse files
Updates for issue #477, wrap exceptions which may be thrown in sumTimes and rethrow
1 parent be7ec10 commit f9cad32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/cucumber/runtime/formatter/JUnitFormatter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ private String sumTimes(NodeList testCaseNodes) {
137137
Double.parseDouble(testCaseNodes.item(i).getAttributes().getNamedItem("time").getNodeValue());
138138
totalDurationSecondsForAllTimes += testCaseTime;
139139
} catch ( NumberFormatException e ) {
140-
e.printStackTrace();
140+
throw new CucumberException(e);
141141
} catch ( NullPointerException e ) {
142-
e.printStackTrace();
142+
throw new CucumberException(e);
143143
}
144144
}
145145
DecimalFormat nfmt = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US);

0 commit comments

Comments
 (0)