diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-10-18 17:05:35 +0200 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2019-10-22 08:16:18 +0200 |
commit | 31217a8e88d7414579284267f8715112bf8a0fc6 (patch) | |
tree | d7add72e83fef8ea7779df087a8552c0ffc1748c /test/message/throw_undefined_traced.js | |
parent | 71b342f93725a9bba5fa1f83a9f0fa88a482d759 (diff) | |
download | android-node-v8-31217a8e88d7414579284267f8715112bf8a0fc6.tar.gz android-node-v8-31217a8e88d7414579284267f8715112bf8a0fc6.tar.bz2 android-node-v8-31217a8e88d7414579284267f8715112bf8a0fc6.zip |
cli: add --trace-uncaught flag
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: https://github.com/nodejs/node/pull/30025
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'test/message/throw_undefined_traced.js')
-rw-r--r-- | test/message/throw_undefined_traced.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/message/throw_undefined_traced.js b/test/message/throw_undefined_traced.js new file mode 100644 index 0000000000..f6ded43378 --- /dev/null +++ b/test/message/throw_undefined_traced.js @@ -0,0 +1,6 @@ +// Flags: --trace-uncaught +'use strict'; +require('../common'); + +// eslint-disable-next-line no-throw-literal +throw undefined; |