Skip to content

Commit

Permalink
error stacktrace still not fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
msteveb committed Sep 6, 2024
1 parent 5145f62 commit 189b90d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jim-eventloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ int Jim_EvalObjBackground(Jim_Interp *interp, Jim_Obj *scriptObjPtr)
eventLoop->suppress_bgerror++;
}
else {
fprintf(stderr, "script failed: {%s} with retval %d\n", Jim_String(scriptObjPtr), retval);
fprintf(stderr, "result was {%s}\n", Jim_String(objv[1]));
/* Report the error to stderr. */
Jim_MakeErrorMessage(interp);
fprintf(stderr, "%s\n", Jim_String(Jim_GetResult(interp)));
Expand Down
6 changes: 6 additions & 0 deletions tests/event.test
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ test event-11.6 {Tcl_VwaitCmd procedure: round robin scheduling, same source} {s
list $x $y $z
} {3 3 done}

proc bgerror {msg} {
puts "bgerror $msg"
puts "called from [stacktrace]"
puts "error stacktrace is [info stacktrace]"
}

test event-12.1 {Tcl_UpdateCmd procedure - usage} -body {
update a b
} -returnCodes error -result {wrong # args: should be "update ?idletasks?"}
Expand Down

0 comments on commit 189b90d

Please sign in to comment.