@@ -170,39 +170,6 @@ global or scoped variable, the input `fs` will be evaluated on-demand as
170170> fs.createReadStream(' ./some/file' );
171171```
172172
173- #### Global uncaught exceptions
174-
175- <!-- YAML
176- changes:
177- - version: v12.3.0
178- pr-url: https://github.com/nodejs/node/pull/27151
179- description: The `'uncaughtException'` event is from now on triggered if the
180- repl is used as standalone program.
181- -->
182-
183- The REPL uses the [ ` domain ` ] [ ] module to catch all uncaught exceptions for that
184- REPL session.
185-
186- This use of the [ ` domain ` ] [ ] module in the REPL has these side effects:
187-
188- * Uncaught exceptions only emit the [ ` 'uncaughtException' ` ] [ ] event in the
189- standalone REPL. Adding a listener for this event in a REPL within
190- another Node.js program results in [ ` ERR_INVALID_REPL_INPUT ` ] [ ] .
191-
192- ``` js
193- const r = repl .start ();
194-
195- r .write (' process.on("uncaughtException", () => console.log("Foobar"));\n ' );
196- // Output stream includes:
197- // TypeError [ERR_INVALID_REPL_INPUT]: Listeners for `uncaughtException`
198- // cannot be used in the REPL
199-
200- r .close ();
201- ```
202-
203- * Trying to use [ ` process.setUncaughtExceptionCaptureCallback() ` ] [ ] throws
204- an [ ` ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE ` ] [ ] error.
205-
206173#### Assignment of the ` _ ` (underscore) variable
207174
208175<!-- YAML
@@ -1181,7 +1148,6 @@ Original code from <https://gist.github.com/TooTallNate/2053342>.
11811148[ ZSH ] : https://en.wikipedia.org/wiki/Z_shell
11821149[ `'uncaughtException'` ] : process.md#event-uncaughtexception
11831150[ `ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE` ] : errors.md#err_domain_cannot_set_uncaught_exception_capture
1184- [ `ERR_INVALID_REPL_INPUT` ] : errors.md#err_invalid_repl_input
11851151[ `curl()` ] : https://curl.haxx.se/docs/manpage.html
11861152[ `domain` ] : domain.md
11871153[ `module.builtinModules` ] : module.md#modulebuiltinmodules
0 commit comments