Skip to content

Commit

Permalink
Instead of ??? put <unknown JS frame/file> in JS frames for Python error
Browse files Browse the repository at this point in the history
This is much clearer.
  • Loading branch information
hoodmane committed Feb 22, 2025
1 parent 4b301a0 commit 24d3e22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/error_handling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ Module.handle_js_error = function (e: any) {
if (isPyodideFrame(frame)) {
break;
}
const funcnameAddr = stringToNewUTF8(frame.functionName || "???");
const fileNameAddr = stringToNewUTF8(frame.fileName || "???.js");
const funcnameAddr = stringToNewUTF8(frame.functionName || "<unknown JS frame>");
const fileNameAddr = stringToNewUTF8(frame.fileName || "<unknown JS file>.js");
__PyTraceback_Add(funcnameAddr, fileNameAddr, frame.lineNumber);
_free(funcnameAddr);
_free(fileNameAddr);
Expand Down

0 comments on commit 24d3e22

Please sign in to comment.