Skip to content

Commit aab35a9

Browse files
deokjinkimjuanarbol
authored andcommitted
doc: update error message of example in repl
Error message in document is different from actual result. PR-URL: #45920 Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 53a94a9 commit aab35a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/repl.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Explicitly setting `_error` to a value will disable this behavior.
212212

213213
```console
214214
> throw new Error('foo');
215-
Error: foo
215+
Uncaught Error: foo
216216
> _error.message
217217
'foo'
218218
```
@@ -225,8 +225,8 @@ Support for the `await` keyword is enabled at the top level.
225225
> await Promise.resolve(123)
226226
123
227227
> await Promise.reject(new Error('REPL await'))
228-
Error: REPL await
229-
at repl:1:45
228+
Uncaught Error: REPL await
229+
at REPL2:1:54
230230
> const timeout = util.promisify(setTimeout);
231231
undefined
232232
> const old = Date.now(); await timeout(1000); console.log(Date.now() - old);

0 commit comments

Comments
 (0)