Skip to content

Commit 86da550

Browse files
committed
fixup!
1 parent 74ad16c commit 86da550

4 files changed

Lines changed: 4 additions & 53 deletions

File tree

doc/api/errors.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -760,12 +760,6 @@ An operation outside the bounds of a `Buffer` was attempted.
760760
An attempt has been made to create a `Buffer` larger than the maximum allowed
761761
size.
762762

763-
<a id="ERR_CANNOT_WATCH_SIGINT"></a>
764-
765-
### `ERR_CANNOT_WATCH_SIGINT`
766-
767-
Node.js was unable to watch for the `SIGINT` signal.
768-
769763
<a id="ERR_CHILD_CLOSED_BEFORE_REPLY"></a>
770764

771765
### `ERR_CHILD_CLOSED_BEFORE_REPLY`
@@ -2136,13 +2130,6 @@ An invalid `options.protocol` was passed to `http.request()`.
21362130
Both `breakEvalOnSigint` and `eval` options were set in the [`REPL`][] config,
21372131
which is not supported.
21382132

2139-
<a id="ERR_INVALID_REPL_INPUT"></a>
2140-
2141-
### `ERR_INVALID_REPL_INPUT`
2142-
2143-
The input may not be used in the [`REPL`][]. The conditions under which this
2144-
error is used are described in the [`REPL`][] documentation.
2145-
21462133
<a id="ERR_INVALID_RETURN_PROPERTY"></a>
21472134

21482135
### `ERR_INVALID_RETURN_PROPERTY`

doc/api/repl.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -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

lib/internal/errors.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,6 @@ E('ERR_BUFFER_OUT_OF_BOUNDS',
11531153
E('ERR_BUFFER_TOO_LARGE',
11541154
'Cannot create a Buffer larger than %s bytes',
11551155
RangeError);
1156-
E('ERR_CANNOT_WATCH_SIGINT', 'Cannot watch for SIGINT signals', Error);
11571156
E('ERR_CHILD_CLOSED_BEFORE_REPLY',
11581157
'Child closed before reply received', Error);
11591158
E('ERR_CHILD_PROCESS_IPC_REQUIRED',
@@ -1540,7 +1539,6 @@ E('ERR_INVALID_PROTOCOL',
15401539
TypeError);
15411540
E('ERR_INVALID_REPL_EVAL_CONFIG',
15421541
'Cannot specify both "breakEvalOnSigint" and "eval" for REPL', TypeError);
1543-
E('ERR_INVALID_REPL_INPUT', '%s', TypeError);
15441542
E('ERR_INVALID_RETURN_PROPERTY', (input, name, prop, value) => {
15451543
return `Expected a valid ${input} to be returned for the "${prop}" from the` +
15461544
` "${name}" hook but got ${determineSpecificType(value)}.`;

test/parallel/test-repl-preview.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ async function tests(options) {
7575
...options
7676
});
7777

78-
repl.inputStream.run([
79-
'function foo(x) { return x; }',
80-
'function koo() { console.log("abc"); }',
78+
await runAndWait([
79+
'function foo(x) { return x; } ' +
80+
'function koo() { console.log("abc"); } ' +
8181
'a = undefined;',
82-
]);
82+
], repl);
8383

8484
const testCases = [{
8585
input: 'foo',

0 commit comments

Comments
 (0)