Commit 83b2699
committed
fix(@angular/build): improve error message when an unhandled exception occurs during prerendering
This change enhances the error messaging when an unhandled exception occurs during the prerendering process. The updated error message provides more context and clarity.
**Previous Behavior**
```
ng b
An unhandled exception occurred: Some error!!!
See "/tmp/ng-S2ABKF/angular-errors.log" for further details.
```
**Updated Behavior:**
```
ng b
Browser bundles
Initial chunk files | Names | Raw size | Estimated transfer size
main-AFPIPGGK.js | main | 218.00 kB | 59.48 kB
polyfills-Z2GOM3BN.js | polyfills | 35.82 kB | 11.80 kB
styles-5INURTSO.css | styles | 0 bytes | 0 bytes
| Initial total | 253.82 kB | 71.28 kB
Server bundles
Initial chunk files | Names | Raw size
server.mjs | server | 1.11 MB |
chunk-HZL5H5M5.mjs | - | 526.77 kB |
polyfills.server.mjs | polyfills.server | 269.91 kB |
chunk-GFWAPST7.mjs | - | 19.16 kB |
chunk-5XUXGTUW.mjs | - | 2.55 kB |
render-utils.server.mjs | render-utils.server | 1.46 kB |
main.server.mjs | main.server | 149 bytes |
Lazy chunk files | Names | Raw size
chunk-7YC4RJ5P.mjs | xhr2 | 12.08 kB |
Prerendered 1 static route.
Application bundle generation failed. [4.923 seconds]
✘ [ERROR] An error occurred while prerendering route '/'.
Error: Some error!!!
at render (node_modules/@angular/build/src/utils/server-rendering/render-worker.js:20:20)
at /angular-cli/abc/node_modules/piscina/dist/worker.js:146:32
```
Closes #28212
(cherry picked from commit 71c06c6)1 parent 94e27c8 commit 83b2699
File tree
2 files changed
+40
-22
lines changed- packages
- angular_devkit/build_angular/src/builders/server/tests/behavior
- angular/build/src/utils/server-rendering
2 files changed
+40
-22
lines changedLines changed: 37 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
99 | | - | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
190 | 198 | | |
191 | 199 | | |
192 | 200 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
209 | 222 | | |
210 | 223 | | |
211 | 224 | | |
| |||
231 | 244 | | |
232 | 245 | | |
233 | 246 | | |
234 | | - | |
| 247 | + | |
235 | 248 | | |
236 | 249 | | |
237 | 250 | | |
| |||
275 | 288 | | |
276 | 289 | | |
277 | 290 | | |
| 291 | + | |
278 | 292 | | |
279 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
280 | 297 | | |
281 | 298 | | |
282 | 299 | | |
| |||
285 | 302 | | |
286 | 303 | | |
287 | 304 | | |
288 | | - | |
| 305 | + | |
289 | 306 | | |
290 | 307 | | |
291 | 308 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments