diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-05-17 16:25:36 +0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-05-08 08:15:15 +0200 |
commit | 422e8f762873aef4a37185f3237c0d666c929d8e (patch) | |
tree | e56695393ab0bfe6445a76541502354506916f29 /test/parallel/test-repl-pretty-custom-stack.js | |
parent | 9a174db3d869c8d5cde9e09db92d88d0d97e9513 (diff) | |
download | android-node-v8-422e8f762873aef4a37185f3237c0d666c929d8e.tar.gz android-node-v8-422e8f762873aef4a37185f3237c0d666c929d8e.tar.bz2 android-node-v8-422e8f762873aef4a37185f3237c0d666c929d8e.zip |
repl: handle uncaughtException properly
When running the REPL as standalone program it's now possible to use
`process.on('uncaughtException', listener)`. It is going to use those
listeners from now on and the regular error output is suppressed.
It also fixes the issue that REPL instances started inside of an
application would silence all application errors. It is now prohibited
to add the exception listener in such REPL instances. Trying to add
such listeners throws an `ERR_INVALID_REPL_INPUT` error.
Fixes: https://github.com/nodejs/node/issues/19998
PR-URL: https://github.com/nodejs/node/pull/27151
Fixes: https://github.com/nodejs/node/issues/19998
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/parallel/test-repl-pretty-custom-stack.js')
-rw-r--r-- | test/parallel/test-repl-pretty-custom-stack.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/test/parallel/test-repl-pretty-custom-stack.js b/test/parallel/test-repl-pretty-custom-stack.js index a37cf04263..b65287c5f5 100644 --- a/test/parallel/test-repl-pretty-custom-stack.js +++ b/test/parallel/test-repl-pretty-custom-stack.js @@ -40,8 +40,6 @@ process.on('uncaughtException', (e) => { throw e; }); -process.on('exit', () => (Error.prepareStackTrace = origPrepareStackTrace)); - const tests = [ { // test .load for a file that throws |