Repository navigation
Commit 2af31ef
committed
doc: document REPL DEP0185 throws and uncaught-exception behavior
Two doc-only improvements to `doc/api/repl.md`, both filling gaps left by
recent semver-major REPL changes:
1. `repl.REPLServer` is an ES class. Calling it without `new` is
End-of-Life (DEP0185) and throws a native V8 `TypeError` at runtime.
The "Class: REPLServer" section showed examples that use `new` but did
not tell users that the `new`-less form throws. A short prose note is
added after the construction examples pointing to the DEP0185 entry in
`doc/api/deprecations.md`.
2. PR #64034 ("repl: use inspector over vm") removed the old
"#### Global uncaught exceptions" subsection because the
`domain`-based restrictions it documented no longer exist. The removal
was correct, but the current uncaught-exception model was only
partially documented via the `'unhandled'` description on the
`handleError` option. A top-level `Error handling` section is
added. The prose is anchored to the existing
`Uncaught Error: REPL await` example in the preceding `await keyword`
section and documents the current behavior: uncaught exceptions are
printed by default, `uncaughtException` listeners work freely in
standalone and nested REPLs, and the `handleError` option can forward
exceptions to `'uncaughtException'` by returning `'unhandled'`.1 parent a24bd27 commit 2af31ef
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
235 | 244 | | |
236 | 245 | | |
237 | 246 | | |
| |||
425 | 434 | | |
426 | 435 | | |
427 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
428 | 440 | | |
429 | 441 | | |
430 | 442 | | |
| |||
1127 | 1139 | | |
1128 | 1140 | | |
1129 | 1141 | | |
| 1142 | + | |
1130 | 1143 | | |
1131 | 1144 | | |
1132 | 1145 | | |
| |||
0 commit comments