This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Description
Some 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();
});
});