repl: handle exceptions from async context after close#62165
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Mar 9, 2026
Merged
repl: handle exceptions from async context after close#62165nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
a9da9ff recently restructured async context handling in the REPL source so that it no longer uses the domain module, and instead performs its own async context tracking. That change was not intended to be breaking, but it affected behavior for uncaught exceptions thrown after the REPL was closed. Those would now be treated as uncaught exceptions on the process level, which is probably not intentional in most situations. While it's understandably not great that we handle execptions after closing the REPL instance, I am confident that it's best to restore the previous behavior for now and add more granular handling options separately and intentionally in a (potentially semver-major) follow-up change. Refs: nodejs#61227
Contributor
|
Fast-track has been requested by @addaleax. Please 👍 to approve. |
Member
Author
|
Requesting fast-track since it's a bugfix for a recently landed change |
cjihrig
approved these changes
Mar 9, 2026
Collaborator
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62165 +/- ##
=======================================
Coverage 89.65% 89.65%
=======================================
Files 676 676
Lines 206468 206546 +78
Branches 39537 39550 +13
=======================================
+ Hits 185108 185181 +73
- Misses 13480 13497 +17
+ Partials 7880 7868 -12
🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
lpinca
approved these changes
Mar 9, 2026
Collaborator
|
Landed in bd3cba5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a9da9ff recently restructured async context handling in the REPL source so that it no longer uses the domain module, and instead performs its own async context tracking.
That change was not intended to be breaking, but it affected behavior for uncaught exceptions thrown after the REPL was closed. Those would now be treated as uncaught exceptions on the process level, which is probably not intentional in most situations.
While it's understandably not great that we handle execptions after closing the REPL instance, I am confident that it's best to restore the previous behavior for now and add more granular handling options separately and intentionally in a (potentially semver-major) follow-up change.
Refs: #61227