/** * Takes an action report and updates the message in the report with * the message from the root cause of the report. * * @param report */ static void sanitizeReport(ActionReport report) { if (report != null && report.hasFailures() && report.getFailureCause() != null) { Throwable rootCause = ExceptionUtil.getRootCause( report.getFailureCause()); if (rootCause != null && StringUtils.ok(rootCause.getMessage())) { report.setMessage(rootCause.getMessage()); } } }
/** * Takes an action report and updates the message in the report with * the message from the root cause of the report. * * @param report */ static void sanitizeReport(ActionReport report) { if (report != null && report.hasFailures() && report.getFailureCause() != null) { Throwable rootCause = ExceptionUtil.getRootCause( report.getFailureCause()); if (rootCause != null && StringUtils.ok(rootCause.getMessage())) { report.setMessage(rootCause.getMessage()); } } }
if (report.hasFailures()) { return;
"Executing supplemental command " + aCmd.getClass().getCanonicalName())); aCmd.execute(context); if(context.getActionReport().hasFailures()) { result = FailurePolicy.applyFailurePolicy(aCmd.onFailure(), ActionReport.ExitCode.FAILURE); } else if(context.getActionReport().hasWarnings()) {
if(context.getActionReport().hasFailures()) { result = FailurePolicy.applyFailurePolicy(aCmd.onFailure(), ActionReport.ExitCode.FAILURE); } else if(context.getActionReport().hasWarnings()) {