-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
domains: fix handling of uncaught exceptions #3884
domains: fix handling of uncaught exceptions #3884
Conversation
This PR corresponds to #3654 minus the behavior change mentioned in #3654 (comment). /cc @nodejs/lts @nodejs/ctc @nodejs/collaborators |
LGTM. Would appreciate a few more eyes on it tho @nodejs/lts |
9d31c87
to
608b8dd
Compare
Updated this PR with code review comments from #3654 that apply to the v4.x branch. |
608b8dd
to
0b01280
Compare
Updated again from code review comments in #3654 that apply to the v4.x branch. |
CI tests running. |
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Fixes nodejs#3607 and nodejs#3653.
d7aabca
to
6e3901b
Compare
Back ported changes according to the latest round of reviews in #3654, and started new CI tests. /cc @nodejs/ctc @nodejs/lts |
For reviewers: this PR is basically identical to #3654, except for a behavior change that landed in master, but not in this PR targeted to v4.x. As a result, the test in master that checks that having an error handler in any enclosing domain does not make the process abort when using |
LGTM |
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Fixes #3607 and #3653. PR: #3884 PR-URL: #3884 Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 25cded4. |
@nodejs/lts Just to make sure I'm using labels properly, is the |
Use |
@jasnell Thank you for the clarification. It might be worth it to clarify that in the LTS section of the collaborators guide. I'll see if I can find some time to send a PR and maybe make that aspect clearer. |
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Fixes #3607 and #3653. PR: #3884 PR-URL: #3884 Reviewed-By: James M Snell <jasnell@gmail.com>
Maintenance Update Notable changes * Roughly 78% of the commits are documentation and test improvements * domains: - Fix handling of uncaught exceptions (Julien Gilli) [#3884](#3884) * deps: - Upgrade to npm 2.14.12 (Kat Marchán) [#4110](#4110) - Backport 819b40a from V8 upstream (Michaël Zasso) [#3938](#3938) - Updated node LICENSE file with new npm license (Kat Marchán) [#4110](#4110)
Maintenance Update Notable changes * Roughly 78% of the commits are documentation and test improvements * domains: - Fix handling of uncaught exceptions (Julien Gilli) [#3884](#3884) * deps: - Upgrade to npm 2.14.12 (Kat Marchán) [#4110](#4110) - Backport 819b40a from V8 upstream (Michaël Zasso) [#3938](#3938) - Updated node LICENSE file with new npm license (Kat Marchán) [#4110](#4110)
Fix node exiting due to an exception being thrown rather than emitting an `'uncaughtException'` event on the process object when: 1. no error handler is set on the domain within which an error is thrown 2. an `'uncaughtException'` event listener is set on the process Also fix an issue where the process would not abort in the proper function call if an error is thrown within a domain with no error handler and `--abort-on-uncaught-exception` is used. Fixes #3607 and #3653. PR: #3884 PR-URL: #3884 Reviewed-By: James M Snell <jasnell@gmail.com>
Maintenance Update Notable changes * Roughly 78% of the commits are documentation and test improvements * domains: - Fix handling of uncaught exceptions (Julien Gilli) [#3884](#3884) * deps: - Upgrade to npm 2.14.12 (Kat Marchán) [#4110](#4110) - Backport 819b40a from V8 upstream (Michaël Zasso) [#3938](#3938) - Updated node LICENSE file with new npm license (Kat Marchán) [#4110](#4110)
Maintenance Update Notable changes * Roughly 78% of the commits are documentation and test improvements * domains: - Fix handling of uncaught exceptions (Julien Gilli) [#3884](#3884) * deps: - Upgrade to npm 2.14.12 (Kat Marchán) [#4110](#4110) - Backport 819b40a from V8 upstream (Michaël Zasso) [#3938](#3938) - Updated node LICENSE file with new npm license (Kat Marchán) [#4110](#4110)
Maintenance Update Notable changes * Roughly 78% of the commits are documentation and test improvements * domains: - Fix handling of uncaught exceptions (Julien Gilli) [nodejs#3884](nodejs#3884) * deps: - Upgrade to npm 2.14.12 (Kat Marchán) [nodejs#4110](nodejs#4110) - Backport 819b40a from V8 upstream (Michaël Zasso) [nodejs#3938](nodejs#3938) - Updated node LICENSE file with new npm license (Kat Marchán) [nodejs#4110](nodejs#4110)
Fix node exiting due to an exception being thrown rather than emitting
an
'uncaughtException'
event on the process object when:'uncaughtException'
event listener is set on the processAlso fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and
--abort-on-uncaught-exception
is used.Fixes #3607 and #3653.