-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider calling window.onerror
on possibly unhandled rejections
#428
Comments
I am not sure a separate issue is needed, whatever events we do on |
@petkaantonov I tend to agree withthat. To be fair I don't understnad why Domenic would even want this behavior. |
It's not me that wants it; it's the other Chrome engineers :( |
@domenic calling |
People often hook on
window.onerror
to log exceptions to the server. @domenic proposed native promises callwindow.onerror
on unhandled rejections just like exceptions.Pros:
Cons:
Promise.onPossiblyUnhandledRejection
is already exposed allowing this, in the next version we might fire an event toprocess
from all promises possibly rejected. It's already overridable.onPossiblyUnhandledRejection
in many different ways, some suppress it, some make it throw and some make it perform custom logic. This indicates not everyone treats these as errors.I'm not aware of any other promise libraries considering this at the moment.
The text was updated successfully, but these errors were encountered: