MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / printStackTrace

Method printStackTrace

src/main/java/wyc/util/testing/Util.java:138–147  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 3

runMethod · 0.80
checkMethod · 0.80
applyMethod · 0.80

Calls 5

printlnMethod · 0.80
getNameMethod · 0.65
getMessageMethod · 0.65
toStringMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected