Skip to content

Commit f213dd0

Browse files
draghuramjbachorik
authored andcommitted
Print toString() of all exceptions in the chain. (btraceio#233)
1 parent c137727 commit f213dd0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/share/classes/com/sun/btrace/BTraceUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3419,11 +3419,12 @@ public static void jstack(Throwable exception, int numFrames) {
34193419
return;
34203420
}
34213421
StackTraceElement[] st = exception.getStackTrace();
3422-
println(exception);
3422+
println(exception.toString());
34233423
BTraceRuntime.stackTrace("\t", st, 0, numFrames);
34243424
Throwable cause = exception.getCause();
34253425
while (cause != null) {
3426-
println("Caused by:");
3426+
print("Caused by: ");
3427+
println(cause.toString());
34273428
st = cause.getStackTrace();
34283429
BTraceRuntime.stackTrace("\t", st, 0, numFrames);
34293430
cause = cause.getCause();

0 commit comments

Comments
 (0)