You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Domain is pinned to rejected Promise, but domain is not caught #831
the domain error event handler won't be touched -> the exception will be sent to the unhandledRejection handler, but the promise will have the domain instance pinned to it. I assume this is expected behavior, but since we have the domain, why not fire it's error event instead of firing unhandledRejection?
Note that domains will not interfere with the error handling mechanisms for Promises, i.e. no error event will be emitted for unhandled Promise rejections.
Alrighty, I can see why that decision was made, and I am glad that I can access the domain instance, I was just curious if it was expected behavior. Thanks all.
Activity
benjamingr commentedon Sep 20, 2017
Because that's not how promises with domains work - the error handling model is still promises.
Thanks for the question.
misterdjules commentedon Sep 20, 2017
@ORESoftware
See https://nodejs.org/api/domain.html#domain_domains_and_promises:
ORESoftware commentedon Sep 20, 2017
Alrighty, I can see why that decision was made, and I am glad that I can access the domain instance, I was just curious if it was expected behavior. Thanks all.