List of utility methods to do Exception Print
void | printException(Exception e) Prints out the message of the exception. System.err.println(e.getLocalizedMessage()); |
void | printException(Exception e) print Exception System.out.println("Exception caught! Exiting .."); System.out.println("error message: " + e.getMessage()); e.printStackTrace(); |
void | printException(Exception e) print Exception StackTraceElement ste = null; int i = 0; while (i < e.getStackTrace().length && (ste = e.getStackTrace()[i++]).getLineNumber() == -1) ; if (ste == null) { printError("Utilities.printException error: StackTraceElement ste is null"); return; String className = ste.getClassName(); String methodName = ste.getMethodName(); String fileName = ste.getFileName(); int lineNumber = ste.getLineNumber(); printError(e.toString()); printError("\tat " + className + "." + methodName + "(" + fileName + ":" + lineNumber + ")"); |
void | printException(Exception e, String message) Prints an error message with the exception stacktrace to the console with the prefix EXCEPTION!
|
void | printException(String excption) print Exception System.err.println(excption); |
void | printException(String prefix, Exception e) print Exception String message = (e == null) ? null : e.getMessage();
if ((message == null) && (e != null))
message = e.getClass().getName();
System.err.println(prefix + message);
System.err.flush();
|
void | PrintException(StringBuilder Str, boolean HTML, Throwable T, boolean PrintCauseToo) Print Exception if (PrintCauseToo == true && T.getCause() != null) { PrintException(Str, HTML, T.getCause()); if (HTML == true) Str.append("<BR>"); Str.append("\n"); PrintException(Str, HTML, T); |
void | printException(Throwable e, StackTraceElement[] trace) print Exception StringBuilder out = new StringBuilder("--- Exception in Async Thread ---\n"); out.append(e.getClass().getName()).append(": ").append(e.getMessage()).append('\n'); StackTraceElement[] st = e.getStackTrace(); out.append(printTrace(st)); Throwable cause = e.getCause(); while (cause != null) { out.append(cause.getClass().getName()).append(": ").append(cause.getMessage()).append('\n'); st = cause.getStackTrace(); ... |
void | printExceptionInfo(Exception e) print Exception Info System.out.println(e.getClass().getName() + " Error: "); System.out.println(e.getMessage() + "\n" + e.getStackTrace()); |
String | printExceptionMessage(Throwable ex) Return stack trace of the Throwable ex. return printExceptionMessage(ex, 15);
|