mirror of
https://github.com/nodejs/node.git
synced 2024-11-25 08:19:38 +01:00
59d3d542d6
Display Node.js version at the end of stacktraces on fatal exception that causes exit. Easier for debugging so you don't have to ask "what node version are you on?", it is directly in the error the user copy/paste from when asking for help. Fixes: https://github.com/nodejs/node/issues/29731 PR-URL: https://github.com/nodejs/node/pull/38332 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com>
90 lines
2.4 KiB
Plaintext
90 lines
2.4 KiB
Plaintext
[stdin]
|
|
[stdin]:1
|
|
with(this){__filename}
|
|
^^^^
|
|
|
|
SyntaxError: Strict mode code may not include a with statement
|
|
at new Script (node:vm:*)
|
|
at createScript (node:vm:*)
|
|
at Object.runInThisContext (node:vm:*)
|
|
at node:internal/process/execution:*:*
|
|
at [stdin]-wrapper:*:*
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_stdin:*:*
|
|
at Socket.<anonymous> (node:internal/process/execution:*:*)
|
|
at Socket.emit (node:events:*:*)
|
|
at endReadableNT (node:internal/streams/readable:*:*)
|
|
|
|
Node.js *
|
|
42
|
|
42
|
|
[stdin]:1
|
|
throw new Error("hello")
|
|
^
|
|
|
|
Error: hello
|
|
at [stdin]:1:7
|
|
at Script.runInThisContext (node:vm:*)
|
|
at Object.runInThisContext (node:vm:*)
|
|
at node:internal/process/execution:*:*
|
|
at [stdin]-wrapper:*:*
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_stdin:*:*
|
|
at Socket.<anonymous> (node:internal/process/execution:*:*)
|
|
at Socket.emit (node:events:*:*)
|
|
at endReadableNT (node:internal/streams/readable:*:*)
|
|
|
|
Node.js *
|
|
[stdin]:1
|
|
throw new Error("hello")
|
|
^
|
|
|
|
Error: hello
|
|
at [stdin]:1:*
|
|
at Script.runInThisContext (node:vm:*)
|
|
at Object.runInThisContext (node:vm:*)
|
|
at node:internal/process/execution:*:*
|
|
at [stdin]-wrapper:*:*
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_stdin:*:*
|
|
at Socket.<anonymous> (node:internal/process/execution:*:*)
|
|
at Socket.emit (node:events:*:*)
|
|
at endReadableNT (node:internal/streams/readable:*:*)
|
|
|
|
Node.js *
|
|
100
|
|
[stdin]:1
|
|
let x = 100; y = x;
|
|
^
|
|
|
|
ReferenceError: y is not defined
|
|
at [stdin]:1:16
|
|
at Script.runInThisContext (node:vm:*)
|
|
at Object.runInThisContext (node:vm:*)
|
|
at node:internal/process/execution:*:*
|
|
at [stdin]-wrapper:*:*
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_stdin:*:*
|
|
at Socket.<anonymous> (node:internal/process/execution:*:*)
|
|
at Socket.emit (node:events:*:*)
|
|
at endReadableNT (node:internal/streams/readable:*:*)
|
|
|
|
Node.js *
|
|
|
|
[stdin]:1
|
|
let ______________________________________________; throw 10
|
|
^
|
|
10
|
|
(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
|
|
|
Node.js *
|
|
|
|
[stdin]:1
|
|
let ______________________________________________; throw 10
|
|
^
|
|
10
|
|
(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
|
|
|
Node.js *
|
|
done
|