} else { tabularResultData.accumulate("Status", errorPrefix + functionResult.getMessage()); tabularResultData.setStatus(Status.ERROR);
"ERROR: " + result.getThrowable().getClass().getName() + ": " + result.getThrowable().getMessage()); tabularData.setStatus(Result.Status.ERROR); } else { String[] strings = (String[]) result.getSerializables();
public static CommandResult buildResult(List<CliFunctionResult> functionResults, String header, String footer) { TabularResultData tabularData = ResultBuilder.createTabularResultData(); boolean success = false; for (CliFunctionResult result : functionResults) { tabularData.accumulate("Member", result.getMemberIdOrName()); tabularData.accumulate("Status", result.getLegacyStatus()); // if one member returns back successful results, the command results in success if (result.isSuccessful()) { success = true; } } if (header != null) { tabularData.setHeader(header); } if (footer != null) { tabularData.setFooter(footer); } tabularData.setStatus(success ? Result.Status.OK : Result.Status.ERROR); return ResultBuilder.buildResult(tabularData); }
+ result.getThrowable().getMessage()); accumulatedData = true; tabularData.setStatus(Result.Status.ERROR); } else { String[] strings = (String[]) result.getSerializables();
+ result.getThrowable().getMessage()); accumulatedData = true; tabularData.setStatus(Result.Status.ERROR); } else { String[] strings = (String[]) result.getSerializables();
tabularData.accumulate("Function", "<ERROR: " + result.getThrowable().getMessage() + ">"); accumulatedData = true; tabularData.setStatus(Result.Status.ERROR); } else if (result.isSuccessful()) { String[] strings = (String[]) result.getSerializables();