repl: add customizable error handling#62188
Merged
Merged
Conversation
Whether or not an exception should be handled when it was thrown in the REPL's context but the REPL is already closed is something that will depend on the details of the specific REPL instance's use case. Adding this option lets the REPL's creator control the details of this behavior. This resolves a TODO recently added in bd3cba5.
7aa0e38 to
64670a3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62188 +/- ##
=======================================
Coverage 89.65% 89.66%
=======================================
Files 676 676
Lines 206546 206561 +15
Branches 39558 39552 -6
=======================================
+ Hits 185179 185204 +25
+ Misses 13485 13474 -11
- Partials 7882 7883 +1
🚀 New features to boost your workflow:
|
cjihrig
approved these changes
Mar 11, 2026
Collaborator
atlowChemi
approved these changes
Mar 11, 2026
Collaborator
|
Landed in 5e3951e |
aduh95
pushed a commit
that referenced
this pull request
Mar 25, 2026
Whether or not an exception should be handled when it was thrown in the REPL's context but the REPL is already closed is something that will depend on the details of the specific REPL instance's use case. Adding this option lets the REPL's creator control the details of this behavior. This resolves a TODO recently added in bd3cba5. PR-URL: #62188 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
aduh95
pushed a commit
that referenced
this pull request
Mar 28, 2026
Whether or not an exception should be handled when it was thrown in the REPL's context but the REPL is already closed is something that will depend on the details of the specific REPL instance's use case. Adding this option lets the REPL's creator control the details of this behavior. This resolves a TODO recently added in bd3cba5. PR-URL: #62188 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
nodejs-github-bot
added a commit
that referenced
this pull request
Mar 31, 2026
Notable changes: async_hooks: * (SEMVER-MINOR) add using scopes to AsyncLocalStorage (Stephen Belanger) #61674 benchmark: * (SEMVER-MINOR) add benchmarks for experimental stream/iter (James M Snell) #62066 cli: * (SEMVER-MINOR) add --max-heap-size option (tannal) #58708 crypto: * (SEMVER-MINOR) add TurboSHAKE and KangarooTwelve Web Cryptography algorithms (Filip Skokan) #62183 repl: * (SEMVER-MINOR) add customizable error handling (Anna Henningsen) #62188 * (SEMVER-MINOR) remove dependency on domain module (Matteo Collina) #61227 sea: * (SEMVER-MINOR) support code cache for ESM entrypoint in SEA (Joyee Cheung) #62158 stream: * (SEMVER-MINOR) add stream/iter Implementation (James M Snell) #62066 test: * (SEMVER-MINOR) add tests for experimental stream/iter implementation (James M Snell) #62066 test_runner: * add exports option for module mocks (sangwook) #61727 PR-URL: #62522
aduh95
added a commit
that referenced
this pull request
Mar 31, 2026
Notable changes: async_hooks: * (SEMVER-MINOR) add using scopes to `AsyncLocalStorage` (Stephen Belanger) #61674 cli: * (SEMVER-MINOR) add `--max-heap-size` option (tannal) #58708 crypto: * (SEMVER-MINOR) add TurboSHAKE and KangarooTwelve Web Cryptography algorithms (Filip Skokan) #62183 repl: * (SEMVER-MINOR) add customizable error handling (Anna Henningsen) #62188 * (SEMVER-MINOR) remove dependency on `node:domain` (Matteo Collina) #61227 sea: * (SEMVER-MINOR) support code cache for ESM entrypoint in SEA (Joyee Cheung) #62158 stream: * (SEMVER-MINOR) add stream/iter Implementation (James M Snell) #62066 test_runner: * add exports option for module mocks (sangwook) #61727 PR-URL: #62522
aduh95
added a commit
that referenced
this pull request
Mar 31, 2026
Notable changes: async_hooks: * (SEMVER-MINOR) add using scopes to `AsyncLocalStorage` (Stephen Belanger) #61674 cli: * (SEMVER-MINOR) add `--max-heap-size` option (tannal) #58708 crypto: * (SEMVER-MINOR) add TurboSHAKE and KangarooTwelve Web Cryptography algorithms (Filip Skokan) #62183 repl: * (SEMVER-MINOR) add customizable error handling (Anna Henningsen) #62188 * (SEMVER-MINOR) remove dependency on `node:domain` (Matteo Collina) #61227 sea: * (SEMVER-MINOR) support code cache for ESM entrypoint in SEA (Joyee Cheung) #62158 stream: * (SEMVER-MINOR) add stream/iter Implementation (James M Snell) #62066 test_runner: * add exports option for module mocks (sangwook) #61727 PR-URL: #62522
aduh95
added a commit
that referenced
this pull request
Apr 1, 2026
Notable changes: async_hooks: * (SEMVER-MINOR) add using scopes to `AsyncLocalStorage` (Stephen Belanger) #61674 cli: * (SEMVER-MINOR) add `--max-heap-size` option (tannal) #58708 crypto: * (SEMVER-MINOR) add TurboSHAKE and KangarooTwelve Web Cryptography algorithms (Filip Skokan) #62183 repl: * (SEMVER-MINOR) add customizable error handling (Anna Henningsen) #62188 * (SEMVER-MINOR) remove dependency on `node:domain` (Matteo Collina) #61227 sea: * (SEMVER-MINOR) support code cache for ESM entrypoint in SEA (Joyee Cheung) #62158 stream: * (SEMVER-MINOR) add stream/iter Implementation (James M Snell) #62066 test_runner: * add exports option for module mocks (sangwook) #61727 PR-URL: #62522
Whether or not an exception should be handled when it was thrown in the REPL's context but the REPL is already closed is something that will depend on the details of the specific REPL instance's use case.
Adding this option lets the REPL's creator control the details of this behavior.
This resolves a TODO recently added in bd3cba5.