Unverified Commit 422e8f76 authored by Ruben Bridgewater's avatar Ruben Bridgewater
Browse files

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: default avatarLance Ball <lball@redhat.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
parent 9a174db3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment