Commit 491b0a4
fix(core): Remove duplicate reporting of errors in
This change removes the reporting of errors from the
`ChangeDetectorRef.detectChanges` API. The reporting results in the
error being "handled" in two ways, both by reporting to error handler
and rethrowing the error. This rethrown error generally ends up being
caught further up and again reported to the error handler. The error
handler is meant to be for uncaught errors, and since Angular is not at
the top of the stack of the call of `CDR.detectChanges`, it does not
know what is being done with the rethrown error.
Note that for zone-based applications, this will likely have no effect
other than removing duplicate reporting of the error. If the rethrown
error is not already being caught, it will reach the NgZone's error
trap and still be reported to the application `ErrorHandler`.
PR Close #60056CDR.detectChanges (#60056)1 parent af2e79e commit 491b0a4
16 files changed
Lines changed: 11 additions & 51 deletions
File tree
- packages/core
- src
- application
- change_detection/scheduling
- render3
- instructions
- test/bundling
- animations-standalone
- animations
- cyclic_import
- defer
- forms_reactive
- forms_template_driven
- hello_world
- hydration
- router
- standalone_bootstrap
- todo
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
| 672 | + | |
| 673 | + | |
679 | 674 | | |
680 | 675 | | |
681 | 676 | | |
| |||
893 | 888 | | |
894 | 889 | | |
895 | 890 | | |
896 | | - | |
897 | 891 | | |
898 | 892 | | |
899 | 893 | | |
| |||
910 | 904 | | |
911 | 905 | | |
912 | 906 | | |
913 | | - | |
| 907 | + | |
914 | 908 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
| |||
Lines changed: 4 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 79 | + | |
84 | 80 | | |
85 | 81 | | |
86 | 82 | | |
| |||
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 94 | | |
104 | 95 | | |
105 | 96 | | |
| |||
146 | 137 | | |
147 | 138 | | |
148 | 139 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 140 | + | |
154 | 141 | | |
155 | 142 | | |
156 | | - | |
| 143 | + | |
157 | 144 | | |
158 | 145 | | |
159 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
327 | 326 | | |
328 | 327 | | |
329 | 328 | | |
330 | | - | |
| 329 | + | |
331 | 330 | | |
332 | 331 | | |
333 | 332 | | |
| |||
338 | 337 | | |
339 | 338 | | |
340 | 339 | | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 340 | + | |
346 | 341 | | |
347 | 342 | | |
348 | 343 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | 273 | | |
275 | 274 | | |
276 | 275 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
295 | 294 | | |
296 | 295 | | |
297 | 296 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | 274 | | |
276 | 275 | | |
277 | 276 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
| |||
408 | 407 | | |
409 | 408 | | |
410 | 409 | | |
411 | | - | |
412 | 410 | | |
413 | 411 | | |
414 | 412 | | |
| |||
0 commit comments