Skip to content

Commit

Permalink
doc: update error message of example in repl
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
deokjinkim authored and RafaelGSS committed Jan 4, 2023
1 parent b17194c commit e5e0080
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Explicitly setting `_error` to a value will disable this behavior.

```console
> throw new Error('foo');
Error: foo
Uncaught Error: foo
> _error.message
'foo'
```
Expand All @@ -225,8 +225,8 @@ Support for the `await` keyword is enabled at the top level.
> await Promise.resolve(123)
123
> await Promise.reject(new Error('REPL await'))
Error: REPL await
at repl:1:45
Uncaught Error: REPL await
at REPL2:1:54
> const timeout = util.promisify(setTimeout);
undefined
> const old = Date.now(); await timeout(1000); console.log(Date.now() - old);
Expand Down

0 comments on commit e5e0080

Please sign in to comment.