Skip to content

Commit

Permalink
Only print "Detailed message" when there is one
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Nov 18, 2024
1 parent 5e3ab9f commit dc4077b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ public void report(BigBang bb) {
printStream.close();

String unsupportedFeaturesMessage;
String output = outputStream.toString();
String detailedMessage = output.isEmpty() ? "" : "\nDetailed message:\n" + output;
if (singleEntry) {
unsupportedFeaturesMessage = entries.get(0).message + "\nDetailed message:\n" + outputStream.toString();
unsupportedFeaturesMessage = entries.get(0).message + detailedMessage;
throw new UnsupportedFeatureException(unsupportedFeaturesMessage, entries.get(0).originalException);
} else {
unsupportedFeaturesMessage = "Unsupported features in " + entries.size() + " methods" + "\nDetailed message:\n" + outputStream.toString();
unsupportedFeaturesMessage = "Unsupported features in " + entries.size() + " methods" + detailedMessage;
throw new UnsupportedFeatureException(unsupportedFeaturesMessage);
}

Expand Down

0 comments on commit dc4077b

Please sign in to comment.