/** * The <code>report()</code> method generates a textual report that is printed on the terminal * for the user. */ public void report() { Terminal.print(Terminal.ERROR_COLOR, message); Terminal.print(": " + param + '\n'); if (STACKTRACES) { printStackTrace(); } }
/** * The <code>printHeader()</code> method prints out the first line of the help text for this item. * This includes the option's name, type, and its default value. * * @param type the type of the item as a string * @param defvalue the default value for the item as a string */ public void printHeader(String type, String defvalue) { Terminal.printGreen(" -" + name); Terminal.print(": "); Terminal.printBrightCyan(type); Terminal.print(" = "); Terminal.printYellow(defvalue); Terminal.nextln(); }
/** * The <code>printDescription()</code> method prints out a well-formatted representation of the * description of the item to the terminal. */ public void printDescription() { Terminal.print(StringUtil.formatParagraphs(description, 8, 0, Terminal.MAXLINE)); Terminal.nextln(); }
@Override public void report() { Terminal.print(Terminal.ERROR_COLOR, category); Terminal.print(": " + param + '\n'); printStackTrace(); }
/** * The <code>warning()</code> method writes a warning to the terminal. It does not produce an * exception or a stack trace. * * @param s the warning to report */ public static void warning(String s) { Terminal.print(Terminal.WARN_COLOR, "Internal Warning"); Terminal.print(": " + s + '\n'); }
@Override public void report() { Terminal.print(Terminal.ERROR_COLOR, "Unexpected exception"); Terminal.print(": " + param + '\n'); thrown.printStackTrace(); }