-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a flag that makes Node.js print the stack trace at the time of *throwing* uncaught exceptions, rather than at the creation of the `Error` object, if there is any. This is disabled by default because it affects GC behavior. PR-URL: #30025 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
- Loading branch information
Showing
17 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Flags: --trace-uncaught | ||
'use strict'; | ||
require('../common'); | ||
throw { // eslint-disable-line no-throw-literal | ||
get stack() { | ||
throw new Error('weird throw but ok'); | ||
}, | ||
get name() { | ||
throw new Error('weird throw but ok'); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
*:4 | ||
throw { // eslint-disable-line no-throw-literal | ||
^ | ||
[object Object] | ||
Thrown at: | ||
at *throw_error_with_getter_throw_traced.js:*:* | ||
at Module._compile (internal/modules/cjs/loader.js:*:*) | ||
at Module._extensions..js (internal/modules/cjs/loader.js:*:*) | ||
at Module.load (internal/modules/cjs/loader.js:*:*) | ||
at Module._load (internal/modules/cjs/loader.js:*:*) | ||
at Module.runMain (internal/modules/cjs/loader.js:*:*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
throw null; | ||
^ | ||
null | ||
(Use `node --trace-uncaught ...` to show where the exception was thrown) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Flags: --trace-uncaught | ||
'use strict'; | ||
require('../common'); | ||
|
||
// eslint-disable-next-line no-throw-literal | ||
throw null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
*test*message*throw_null_traced.js:* | ||
throw null; | ||
^ | ||
null | ||
Thrown at: | ||
at *throw_null_traced.js:*:* | ||
at Module._compile (internal/modules/cjs/loader.js:*:*) | ||
at Module._extensions..js (internal/modules/cjs/loader.js:*:*) | ||
at Module.load (internal/modules/cjs/loader.js:*:*) | ||
at Module._load (internal/modules/cjs/loader.js:*:*) | ||
at Module.runMain (internal/modules/cjs/loader.js:*:*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
throw undefined; | ||
^ | ||
undefined | ||
(Use `node --trace-uncaught ...` to show where the exception was thrown) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Flags: --trace-uncaught | ||
'use strict'; | ||
require('../common'); | ||
|
||
// eslint-disable-next-line no-throw-literal | ||
throw undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
*test*message*throw_undefined_traced.js:* | ||
throw undefined; | ||
^ | ||
undefined | ||
Thrown at: | ||
at *throw_undefined_traced.js:*:* | ||
at Module._compile (internal/modules/cjs/loader.js:*:*) | ||
at Module._extensions..js (internal/modules/cjs/loader.js:*:*) | ||
at Module.load (internal/modules/cjs/loader.js:*:*) | ||
at Module._load (internal/modules/cjs/loader.js:*:*) | ||
at Module.runMain (internal/modules/cjs/loader.js:*:*) |