List of utility methods to do Error Print
void | printErrorFooter(String content) print Error Footer System.out.println(""); System.out.println("+---------------------------------------------------------+"); System.out.println("| " + content); System.out.println("+---------------------------------------------------------+"); |
String | printErrorInfo(Object e) print Error Info String causeText; if (e instanceof Throwable) { ((Throwable) e).printStackTrace(); causeText = e.toString(); } else { causeText = e.toString(); System.err.println("ErrorInfo: " + causeText); ... |
void | printErrorLine() print Error Line System.err.println(" at " + Thread.currentThread().getStackTrace()[2]);
|
void | printErrorln(String string) print Errorln if (progressLine) { if (disableFancy) { if (progressLineUsed) { System.out.println(); printsSinceReturn = 0; } else { System.out.print("\r \r"); ... |
void | printErrorMessage(final String prg_name, final String message) print Error Message System.out.println("[" + prg_name + "] > error: " + message); |
void | printErrorMessage(String errorMessage) Print the error message if it is not null and empty string. if (errorMessage != null && !errorMessage.trim().equals("")) { System.out.println("Error Message: " + errorMessage); |
void | printErrorMsgTraceAsCause(Throwable throwable, StackTraceElement[] causedTrace) Print error msg trace as cause. StackTraceElement[] trace = throwable.getStackTrace(); int m = trace.length - 1, n = causedTrace.length - 1; while (m >= 0 && n >= 0 && trace[m].equals(causedTrace[n])) { m--; n--; int framesInCommon = trace.length - 1 - m; System.err.println(new StringBuffer().append("\t\t\t\tCaused by: ").append(throwable).toString()); ... |