Commit 0c23b0b
committed
process: wrap ENOENT from process.cwd() with ERR_SYSTEM_ERROR
Catch ENOENT from rawMethods.cwd() and rethrow as ERR_SYSTEM_ERROR with context { syscall: 'process.cwd', code: 'ENOENT' }, preserving the original error in cause. This surfaces a clearer, actionable message when the current working directory has been deleted or unmounted and improves the stack (process.cwd instead of wrappedCwd).
Fixes: #570451 parent f1a8f44 commit 0c23b0b
1 file changed
+26
-9
lines changedLines changed: 26 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
143 | 160 | | |
144 | 161 | | |
0 commit comments