List of utility methods to do Exception Print
void | PrintExceptionMessages(StringBuilder Str, boolean HTML, Throwable T, boolean PrintCauseToo) Print Exception Messages if (HTML == true) Str.append("<PRE style=\"font-size: 75%;\">\n"); if (PrintCauseToo == true && T.getCause() != null) { Str.append(T.getCause().getClass().getName()).append(": ").append(T.getCause().getMessage()) .append("\n"); Str.append(T.getClass().getName()).append(": ").append(T.getMessage()).append("\n"); if (HTML == true) ... |
String | printExceptionWithStackTrace(Throwable t) print Exception With Stack Trace StringBuilder sb = new StringBuilder(); sb.append(t); sb.append("\n"); for (;;) { for (StackTraceElement s : t.getStackTrace()) { sb.append(s.toString()); sb.append("\n"); t = t.getCause(); if (t == null) { break; sb.append("Caused by: " + t.toString() + "\n"); return sb.toString(); |