mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
7f0b49d8c4
Previously, effect() would handle errors differently depending on the effect type. Root effects had a try/catch that would execute them independently and report errors to `ErrorHandler`, while component effects would "crash" CD. This commit switches all effects to use the same error handling (errors always reach the CD error handler). An additional unrelated refactoring is thrown in which removes the `pendingTask` machinery from root effects, since they make `ApplicationRef` dirty and thus trigger the scheduler. PR Close #57952