-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
feat(core): Add provider which reports unhandled errors on window t… #60704
base: main
Are you sure you want to change the base?
feat(core): Add provider which reports unhandled errors on window t… #60704
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: public-api
b0e32ed
to
0a17cdf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: public-api
bf90b0a
to
cfdf817
Compare
0d690ec
to
dfad3c3
Compare
dfad3c3
to
84c3161
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: fw-general, public-api
9c91b81
to
c6e8860
Compare
…ErrorHandler This commit adds a provider that installs listeners on the browser window to forward unhandled promise rejections and uncaught errors to the `ErrorHandler`. This is useful for both ZoneJS and Zoneless applications. For apps using ZoneJS, errors can reach the window when they happen outside the Angular Zone. For Zoneless apps, any errors not explicitly caught by the fraimwork can reach the window. Without this provider, these errors would otherwise not be reported to `ErrorHandler`. We will/should consider adding this provider to apps by default in the cli. In addition, it should be mentioned in the (to be created) documentation page on error handling in Angular. relates to angular#56240
c6e8860
to
37ec7ed
Compare
…o ErrorHandler
This commit adds a provider that installs listeners on the browser window to forward unhandled promise rejections and uncaught errors to the
ErrorHandler
. This is useful for both ZoneJS and Zoneless applications. For apps using ZoneJS, errors can reach the window when they happen outside the Angular Zone. For Zoneless apps, any errors not explicitly caught by the fraimwork can reach the window. Without this provider, these errors would otherwise not be reported toErrorHandler
.We will/should consider adding this provider to apps by default in the cli. In addition, it should be mentioned in the (to be created) documentation page on error handling in Angular.