Support Node.js domains
See original GitHub issueSome helpful comments from @mikeal on a probable strategy for supporting domains. This would help, from what I understand, in two situations:
- Putting exceptions thrown by
.done()
into the current domain. - When an event emitter or other domain-using callback library is used inside a fulfillment or rejection handler, and throws an error, it would escape Q but wouldn’t escape the domain. E.g.
return Q.resolve().then(function () {
doSomethingAsyncWithoutPromises(function (err, whatever) {
// Q doesn't catch this, but domains would if we wired it up right.
callANonexistantFunction();
});
});
Issue Analytics
- State:
- Created 11 years ago
- Comments:24 (1 by maintainers)
Top Results From Across the Web
Domain | Node.js v19.3.0 Documentation
Domains provide a way to handle multiple different IO operations as a single group. If any of the event emitters or callbacks registered...
Read more >Cloud Domains: Node.js Client
The Cloud Domains Node.js Client API Reference documentation also contains samples. Supported Node.js Versions. Our client libraries follow the ...
Read more >2022: Using the Node.js domain module in production - Medium
I created a package called `domain-haven` in May 2018, which allows your Express server to create a domain for each request and trap...
Read more >Crash safety using domains in Node.js - GoSquared Blog
Domains were introduced in Node.js v0.8 as a way of dealing with unhandled 'error' events, uncaught exceptions, and even errors passed to callbacks...
Read more >Node.js - Domain Module - Tutorialspoint
Node.js domain module is used to intercept unhandled error. These unhandled error can be intercepted using internal binding or external binding.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@danawoodman That section in Kue docs is older than domains deprecation, so please create an issue in Kue to update the docs.
Sorry, I was referring to a linked issue above in kue where they recommend using domains despite their deprecation: https://github.com/Automattic/kue#prevent-from-stuck-active-jobs