fix(core): Surface errors from ApplicationRef.tick to callsite#60102
Closed
atscott wants to merge 1 commit intoangular:mainfrom
Closed
fix(core): Surface errors from ApplicationRef.tick to callsite#60102atscott wants to merge 1 commit intoangular:mainfrom
ApplicationRef.tick to callsite#60102atscott wants to merge 1 commit intoangular:mainfrom
Conversation
c290b03 to
644c63d
Compare
This commit ensures that errors during `ApplicationRef.tick` are surfaced to the callsite rather than being caught and reported to the `ErrorHandler`. The current catch and report approach was originally added in angular@e263e19 with the goal of preventing automatic change detection crashes due to the error happening in the subscription. However, this results in hiding a public API that can hide errors. Callers cannot assume that the tick was successful and perform follow-up work. This change now surfaces errors and adds the error handling directly to the callsites. BREAKING CHANGE: `ApplicationRef.tick` will no longer catch and report errors to the appplication `ErrorHandler`. Errors will instead be thrown out of the method and will allow callers to determine how to handle these errors, such as aborting follow-up work or reporting the error and continuing.
644c63d to
b74e3b8
Compare
Contributor
Author
Contributor
Author
|
caretaker note: please merge and sync on its own. Though there is a green TGP, due to the nature of the change, it would be best to have this in an isolated CL. |
alxhub
approved these changes
Mar 7, 2025
Contributor
|
This PR was merged into the repository by commit 338818c. The changes were merged into the following branches: main |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit ensures that errors during
ApplicationRef.tickare surfaced to the callsite rather than being caught and reported to theErrorHandler.The current catch and report approach was originally added in e263e19 with the goal of preventing automatic change detection crashes due to the error happening in the subscription. However, this results in hiding a public API that can hide errors. Callers cannot assume that the tick was successful and perform follow-up work.
This change now surfaces errors and adds the error handling directly to the callsites.
BREAKING CHANGE:
ApplicationRef.tickwill no longer catch and report errors to the appplicationErrorHandler. Errors will instead be thrown out of the method and will allow callers to determine how to handle these errors, such as aborting follow-up work or reporting the error and continuing.