Commit f56cd36
errors: provide defaults for unmapped uv errors
libuv does not map 100% of errors. When an unmapped error is
encountered, the Map returns undefined, which is then
unsuccessfully destructured, causing an exception. This commit
adds a default value in the event of an unmapped error.
PR-URL: #29288
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent a5049c0 commit f56cd36Copy full SHA for f56cd36
File tree
Expand file treeCollapse file tree
2 files changed
+29
-2
lines changedOpen diff view settings
Filter options
- lib/internal
- test/parallel
Expand file treeCollapse file tree
2 files changed
+29
-2
lines changedOpen diff view settings
Collapse file
+4-2Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
327 | 327 | |
328 | 328 | |
329 | 329 | |
| 330 | + |
| 331 | + |
330 | 332 | |
331 | 333 | |
332 | 334 | |
| ||
346 | 348 | |
347 | 349 | |
348 | 350 | |
349 | | - |
| 351 | + |
350 | 352 | |
351 | 353 | |
352 | 354 | |
| ||
404 | 406 | |
405 | 407 | |
406 | 408 | |
407 | | - |
| 409 | + |
408 | 410 | |
409 | 411 | |
410 | 412 | |
|
Collapse file
test/parallel/test-uv-unmapped-exception.js
Copy file name to clipboard+25Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
0 commit comments