Commit 4b7708a 1 parent 292b529 commit 4b7708a Copy full SHA for 4b7708a
File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,15 @@ console.log('hello world');
30
30
console .log (' hello %s' , ' world' );
31
31
// Prints: hello world, to stdout
32
32
console .error (new Error (' Whoops, something bad happened' ));
33
- // Prints: [Error: Whoops, something bad happened], to stderr
33
+ // Prints error message and stack trace to stderr:
34
+ // Error: Whoops, something bad happened
35
+ // at [eval]:5:15
36
+ // at Script.runInThisContext (node:vm:132:18)
37
+ // at Object.runInThisContext (node:vm:309:38)
38
+ // at node:internal/process/execution:77:19
39
+ // at [eval]-wrapper:6:22
40
+ // at evalScript (node:internal/process/execution:76:60)
41
+ // at node:internal/main/eval_string:23:3
34
42
35
43
const name = ' Will Robinson' ;
36
44
console .warn (` Danger ${ name} ! Danger!` );
You can’t perform that action at this time.
0 commit comments