// and also set report.setFailureCause(exception). We need to avoid the duplicate message.
if (aReport.getMessage() != null && aReport.getMessage().length() != 0) {
mainMsg = aReport.getMessage();
String format = "{0}";
if (ActionReport.ExitCode.WARNING.equals(aReport.getActionExitCode())) {
LocalStringManagerImpl localStrings = new LocalStringManagerImpl(ActionReporter.class);
format = localStrings.getLocalString("flag.message.as.warning", "Warning: {0}");
}
if (ActionReport.ExitCode.FAILURE.equals(aReport.getActionExitCode())) {
LocalStringManagerImpl localStrings = new LocalStringManagerImpl(ActionReporter.class);
format = localStrings.getLocalString("flag.message.as.failure", "Failure: {0}");
}
if (sb.length() > 0) sb.append(EOL_MARKER);
sb.append(MessageFormat.format(format,mainMsg));
}
if (aReport.getFailureCause() != null && aReport.getFailureCause().getMessage() != null && aReport.getFailureCause().getMessage().length() != 0) {