/** * Exit with a return code of FAILURE after printing the specified formatted error message. * * @param format String format of the error message to print before exiting. * @param arguments arguments to the string format. */ protected static void exitWithFormattedErrorMessage( final String format, final Object... arguments ) { throw new ToolError(String.format(format, arguments)); }
/** * Pretty print a tool error. * * @param toolError ToolError to pretty print. */ private void prettyPrintUserInputError( final ToolError toolError ) { if (mDebugFlag) { toolError.printStackTrace(getPrintStream()); } else { getPrintStream().println(toolError.getErrorMessage()); } }
/** * Exit with a return code of FAILURE after printing the specified error message. * * @param message the error message to print before exiting. */ protected static void exitWithErrorMessage( final String message ) { throw new ToolError(message); }