We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error.prepareStackTrace = function(s, cs) { print(cs[0].getFunctionName()) return 42 } try { eval("bad code") } catch (_) { // ignore }
Outputs:
$ qjs --script t.js null <eval>
That is, the first call site has null as the function name. It'd be infinitesimally nicer if that also returned e.g. <eval>.
<eval>
The text was updated successfully, but these errors were encountered:
Node seems to do the same?
Error.prepareStackTrace = function(s, cs) { cs.forEach(csi => { console.log(csi.getFunctionName()) }); return 42 } try { eval("bad code") } catch (e) { console.log(e); // ignore }
node ./t.cjs null Module._compile Module._extensions..js Module.load Module._load executeUserEntryPoint null [42]
Sorry, something went wrong.
Meaning we can do better :)
Haha true!
No branches or pull requests
Outputs:
That is, the first call site has null as the function name. It'd be infinitesimally nicer if that also returned e.g.
<eval>
.The text was updated successfully, but these errors were encountered: