Skip to content

Commit 2d5a398

Browse files
committed
rt: Don't print a stack with no caller
1 parent 17f1b4e commit 2d5a398

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/piccode/rt/PiccodeException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public void report(boolean die, String kind) {
9090
for (int i = 0; i < list.size(); i++) {
9191
var _frame = list.get(i);
9292
var callSite = _frame.caller;
93+
if (callSite == null) continue;
9394
var _str = String.format(
9495
"[%s:%d:%d]: %s", callSite.file,
9596
callSite.line, callSite.column + 1,

0 commit comments

Comments
 (0)