You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lines third, fifth and eighth (i.e. all throw statements) should be included in the stacktrace.
What do you see instead?
This is the output on stderr:
/tmp/test.js:8
throw err2;
^
Error: test
at Object.<anonymous> (/tmp/test.js:3:9)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47
Additional information
For some reason eighth line is being highlighted but not included in the stacktrace. But the fifth line is completely missing. I think that third line should be highlighted, see #36484.
The text was updated successfully, but these errors were encountered:
The stack trace of an error is generated based on where the Error object is created (line 3 in your example), and the highlighted line is the one which threw the error. This behaviour is produced by V8 (the JS engine Node.js is using), you can reproduce the same behaviour on Chrome browsers as well:
VM177:8 Uncaught Error: test
at <anonymous>:3:9
If you don't like this behaviour, you can open an issue on the V8 issue tracker.
What steps will reproduce the bug?
Run the following code with
node
:What is the expected behavior?
Lines third, fifth and eighth (i.e. all throw statements) should be included in the stacktrace.
What do you see instead?
This is the output on stderr:
Additional information
For some reason eighth line is being highlighted but not included in the stacktrace. But the fifth line is completely missing. I think that third line should be highlighted, see #36484.
The text was updated successfully, but these errors were encountered: