Print a complete stack trace. This differs from Throwable.printStackTrace() in that it always prints all of the trace. @param out @param err
(PrintStream out, Throwable err)
| 136 | * @param err |
| 137 | */ |
| 138 | public static void printStackTrace(PrintStream out, Throwable err) { |
| 139 | out.println(err.getClass().getName() + ": " + err.getMessage()); |
| 140 | for (StackTraceElement ste : err.getStackTrace()) { |
| 141 | out.println("\tat " + ste.toString()); |
| 142 | } |
| 143 | if (err.getCause() != null) { |
| 144 | out.print("Caused by: "); |
| 145 | printStackTrace(out, err.getCause()); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * Following method is something of a kludge as no easy way at the moment to |