Skip to content

Handle asynchronous uncaught errors with domains - #281

Closed
rpaterson wants to merge 2 commits into
caolan:masterfrom
rpaterson:domains
Closed

rpaterson wants to merge 2 commits into
caolan:masterfrom
rpaterson:domains

Conversation

@rpaterson

Copy link
Copy Markdown

Fixes #155, #177, #279

Review on Reviewable

@mattheworiordan

Copy link
Copy Markdown

I am using this fork, it's great, thanks @rpaterson. I am amazed that this is not merged into master given how invaluable it is. 👍

@rpaterson

Copy link
Copy Markdown
Author

Fixed a bug with the original patch when test throws both sync and async errors.

@mreinstein

Copy link
Copy Markdown
Collaborator

it's a clever solution but given that domains are deprecated in node, closing this. see:

https://nodejs.org/dist/latest-v6.x/docs/api/domain.html

@mreinstein mreinstein closed this Sep 7, 2016
@rpaterson

rpaterson commented Sep 7, 2016 •

Copy link
Copy Markdown
Author

@mreinstein the doc you linked says:

This module is pending deprecation. Once a replacement API has been finalized,
this module will be fully deprecated. Most end users should not have cause to use
this module. Users who absolutely must have the functionality that domains provide
may rely on it for the time being but should expect to have to migrate to a different
solution in the future.

I'm all for a better solution when one becomes available, but right now domains seem to be the only practical way to solve this.

@mreinstein

Copy link
Copy Markdown
Collaborator

I hear ya. I just can't justify putting something into nodeunit which has stability level 0. I know it solves several issues but it just doesn't make sense to bank on an API that is definitely going away.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nodeunit should catch exceptions and report them as failures

3 participants