public static void exitWithError() { exit(1); }
public static void exitWithError() { exit(1); }
@Override public void run() { try { Thread.sleep(DELAY); CommonUtils.exit(0); } catch (Exception e) { LOGGER.warn("Failed to shutdown", e); } } }).start();
public static void exitWithError(Logger logger, String msg, Throwable throwable) { if (throwable instanceof CommandLineExitException) { String logMessage = throwable.getMessage(); if (throwable.getCause() != null) { String throwableString = throwableToString(throwable.getCause()); logMessage += NEW_LINE + throwableString; } logger.fatal(logMessage); } else { String throwableString = throwableToString(throwable); logger.fatal(msg + NEW_LINE + throwableString); } exit(1); }
public static void exitWithError(Logger logger, String msg, Throwable throwable) { if (throwable instanceof CommandLineExitException) { String logMessage = throwable.getMessage(); if (throwable.getCause() != null) { String throwableString = throwableToString(throwable.getCause()); logMessage += NEW_LINE + throwableString; } logger.fatal(logMessage); } else { String throwableString = throwableToString(throwable); logger.fatal(msg + NEW_LINE + throwableString); } exit(1); }
static void printHelpAndExit(OptionParser parser, OutputStream sink) { try { parser.formatHelpWith(new BuiltinHelpFormatter(HELP_WIDTH, HELP_INDENTATION)); parser.printHelpOn(sink); } catch (Exception e) { throw new CommandLineExitException("Could not print command line help", e); } exit(0); } }
static void printHelpAndExit(OptionParser parser, OutputStream sink) { try { parser.formatHelpWith(new BuiltinHelpFormatter(HELP_WIDTH, HELP_INDENTATION)); parser.printHelpOn(sink); } catch (Exception e) { throw new CommandLineExitException("Could not print command line help", e); } exit(0); } }
void run() throws Exception { if (options.has(downloadSpec)) { downloader.download(); } else if (options.has(cleanSpec)) { downloader.clean(); } else { coordinator.start(); if (testSuite == null) { int coordinatorPort = coordinatorParameters.getSimulatorProperties().getCoordinatorPort(); LOGGER.info("Coordinator started in interactive mode on port " + coordinatorPort + ". " + "Waiting for commands from the coordinator-remote."); } else { runMonolith.init(deploymentPlan); boolean success = runMonolith.run(testSuite); exit(success ? 0 : 1); } } }