question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Node.js domains

See original GitHub issue

Some helpful comments from @mikeal on a probable strategy for supporting domains. This would help, from what I understand, in two situations:

  1. Putting exceptions thrown by .done() into the current domain.
  2. 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:closed
  • Created 11 years ago
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
behradcommented, Nov 24, 2015

@danawoodman That section in Kue docs is older than domains deprecation, so please create an issue in Kue to update the docs.

0reactions
danawoodmancommented, Nov 22, 2015

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found