Skip to content

repl: add customizable error handling#62188

Open
addaleax wants to merge 2 commits intonodejs:mainfrom
addaleax:repl-handle-errors-fn
Open

repl: add customizable error handling#62188
addaleax wants to merge 2 commits intonodejs:mainfrom
addaleax:repl-handle-errors-fn

Conversation

@addaleax
Copy link
Member

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.

@addaleax addaleax added the semver-minor PRs that contain new features and should be released in the next minor version. label Mar 10, 2026
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. labels Mar 10, 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.
@addaleax addaleax force-pushed the repl-handle-errors-fn branch from 7aa0e38 to 64670a3 Compare March 10, 2026 16:18
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.66%. Comparing base (ae228c1) to head (64980e1).
⚠️ Report is 2 commits behind head on main.

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     
Files with missing lines Coverage Δ
lib/repl.js 94.01% <100.00%> (+0.04%) ⬆️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants