Commit 655d196
fs: use a default callback for fs.close()
The `fs.close()` function requires a callback. Most often the only thing
that callback does is check and rethrow the error if one occurs. To
eliminate common boilerplate, make the callback optional with a default
that checks and rethrows the error as an uncaught exception.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #37174
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>1 parent 66a14d3 commit 655d196Copy full SHA for 655d196
Expand file treeCollapse file tree
2 files changed
+14
-3
lines changedOpen diff view settings
Collapse file
+7-1Lines changed: 7 additions & 1 deletion
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1608 | 1608 | |
1609 | 1609 | |
1610 | 1610 | |
1611 | | - |
| 1611 | + |
1612 | 1612 | |
1613 | 1613 | |
1614 | 1614 | |
| 1615 | + |
| 1616 | + |
| 1617 | + |
1615 | 1618 | |
1616 | 1619 | |
1617 | 1620 | |
| ||
1632 | 1635 | |
1633 | 1636 | |
1634 | 1637 | |
| 1638 | + |
| 1639 | + |
| 1640 | + |
1635 | 1641 | |
1636 | 1642 | |
1637 | 1643 | |
|
Collapse file
+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
438 | 438 | |
439 | 439 | |
440 | 440 | |
441 | | - |
| 441 | + |
| 442 | + |
| 443 | + |
| 444 | + |
| 445 | + |
442 | 446 | |
443 | | - |
| 447 | + |
| 448 | + |
444 | 449 | |
445 | 450 | |
446 | 451 | |
|
0 commit comments