Skip to content

Commit af0f15a

Browse files
committed
BacktraceFormatter: do not print empty line if backtrace is empty.
1 parent 907adf6 commit af0f15a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/truffleruby/language/backtrace/BacktraceFormatter.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,10 @@ public static void printInternalError(RubyContext context, Throwable throwable,
421421
printJavaStackTrace(stream, t);
422422

423423
if (TruffleStackTrace.getStackTrace(t) != null) {
424-
stream.println(formatter.formatBacktrace(null, new Backtrace(t)));
424+
var formatted = formatter.formatBacktrace(null, new Backtrace(t));
425+
if (!formatted.isEmpty()) {
426+
stream.println(formatted);
427+
}
425428
}
426429
}
427430
}

0 commit comments

Comments
 (0)