Skip to content
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: emit uncaughtException when appropriate #3637

Closed
wants to merge 2 commits into from

Conversation

misterdjules
Copy link

Fix node exiting due to an exception being thrown rather than emitting
an 'uncaughtException' event on the process object when no error
handler is set on the domain within which an error is thrown and an
'uncaughtException' event listener is set on the process.

Fixes #3607.

@misterdjules misterdjules added domain Issues and PRs related to the domain subsystem. v0.10 labels Nov 3, 2015
@misterdjules
Copy link
Author

/cc @nodejs/lts @nodejs/collaborators @nodejs/tsc.

* given test tests one of these potentially eroneous behaviors that are
* currently accepted as correct.
*/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Require common please

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@misterdjules
Copy link
Author

Pushed a second commit in this PR that fixes #3653.

It changes the API of process._usingDomains, which I would think should not be used by a significant number of users since it's a no-op after it's been used once, and the additional arguments check has been added after the code that returns early if that function had already been called.

Julien Gilli added 2 commits November 4, 2015 14:20
Fix node exiting due to an exception being thrown rather than emitting
an `'uncaughtException'` event on the process object when no error
handler is set on the domain within which an error is thrown and an
`'uncaughtException'` event listener is set on the process.

Fixes nodejs#3607.
Make the process abort if an error is thrown within a domain with no
error handler and `--abort-on-uncaught-exception` is used.

If the domain within which the error is thrown has no error handler,
but a domain further down the domains stack has one, the process will
not abort.

Fixes nodejs#3653.
@misterdjules
Copy link
Author

Closing in favor of #3887.

@misterdjules misterdjules deleted the fix-issue-3607 branch July 24, 2017 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain Issues and PRs related to the domain subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants