Commit 1246902
errors: move error creation helpers to errors.js
This commit moves error creation helpers scattered around
under lib/ into lib/internal/errors.js in the hope of being clearer
about the differences of errors that we throw into the user land.
- Move util._errnoException and util._exceptionWithHostPort
into internal/errors.js and simplify their logic so it's
clearer what the properties these helpers create.
- Move the errnoException helper in dns.js to internal/errors.js
into internal/errors.js and rename it to dnsException. Simplify
it's logic so it no longer calls errnoException and skips
the unnecessary argument checks.
Backport-PR-URL: #18916
PR-URL: #18546
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 8e31bf4 commit 1246902Copy full SHA for 1246902
File tree
Expand file treeCollapse file tree
10 files changed
+139
-89
lines changedOpen diff view settings
Filter options
- lib
- internal
- http2
Expand file treeCollapse file tree
10 files changed
+139
-89
lines changedOpen diff view settings
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | | - |
49 | | - |
| 48 | + |
| 49 | + |
50 | 50 | |
51 | 51 | |
52 | 52 | |
|
Collapse file
+8-38Lines changed: 8 additions & 38 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
25 | | - |
26 | 24 | |
27 | 25 | |
28 | 26 | |
29 | 27 | |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | 28 | |
36 | 29 | |
37 | 30 | |
| ||
41 | 34 | |
42 | 35 | |
43 | 36 | |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | | - |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | 37 | |
69 | 38 | |
70 | 39 | |
| ||
91 | 60 | |
92 | 61 | |
93 | 62 | |
| 63 | + |
94 | 64 | |
95 | 65 | |
96 | 66 | |
97 | | - |
| 67 | + |
98 | 68 | |
99 | 69 | |
100 | 70 | |
| ||
106 | 76 | |
107 | 77 | |
108 | 78 | |
109 | | - |
| 79 | + |
110 | 80 | |
111 | 81 | |
112 | 82 | |
| ||
186 | 156 | |
187 | 157 | |
188 | 158 | |
189 | | - |
| 159 | + |
190 | 160 | |
191 | 161 | |
192 | 162 | |
| ||
198 | 168 | |
199 | 169 | |
200 | 170 | |
201 | | - |
| 171 | + |
202 | 172 | |
203 | 173 | |
204 | 174 | |
| ||
227 | 197 | |
228 | 198 | |
229 | 199 | |
230 | | - |
| 200 | + |
231 | 201 | |
232 | 202 | |
233 | 203 | |
| ||
240 | 210 | |
241 | 211 | |
242 | 212 | |
243 | | - |
| 213 | + |
244 | 214 | |
245 | 215 | |
246 | 216 | |
| ||
278 | 248 | |
279 | 249 | |
280 | 250 | |
281 | | - |
| 251 | + |
282 | 252 | |
283 | 253 | |
284 | 254 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | | - |
| 66 | + |
67 | 67 | |
68 | 68 | |
69 | 69 | |
|
Collapse file
lib/internal/child_process.js
Copy file name to clipboardExpand all lines: lib/internal/child_process.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | | - |
| 32 | + |
33 | 33 | |
34 | 34 | |
35 | 35 | |
|
Collapse file
+116Lines changed: 116 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
16 | 21 | |
17 | 22 | |
18 | 23 | |
| ||
25 | 30 | |
26 | 31 | |
27 | 32 | |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
28 | 41 | |
29 | 42 | |
30 | 43 | |
| ||
128 | 141 | |
129 | 142 | |
130 | 143 | |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + |
131 | 244 | |
| 245 | + |
| 246 | + |
| 247 | + |
132 | 248 | |
133 | 249 | |
134 | 250 | |
|
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1619 | 1619 | |
1620 | 1620 | |
1621 | 1621 | |
1622 | | - |
| 1622 | + |
1623 | 1623 | |
1624 | 1624 | |
1625 | 1625 | |
| ||
1662 | 1662 | |
1663 | 1663 | |
1664 | 1664 | |
1665 | | - |
| 1665 | + |
1666 | 1666 | |
1667 | 1667 | |
1668 | 1668 | |
|
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
170 | 170 | |
171 | 171 | |
172 | 172 | |
173 | | - |
| 173 | + |
174 | 174 | |
175 | 175 | |
176 | 176 | |
| ||
200 | 200 | |
201 | 201 | |
202 | 202 | |
203 | | - |
| 203 | + |
204 | 204 | |
205 | 205 | |
206 | 206 | |
|
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
58 | 58 | |
59 | 59 | |
60 | 60 | |
61 | | - |
62 | | - |
| 61 | + |
| 62 | + |
63 | 63 | |
64 | 64 | |
65 | 65 | |
|
Collapse file
+3-5Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
| 24 | + |
25 | 25 | |
26 | 26 | |
27 | | - |
28 | | - |
29 | 27 | |
30 | 28 | |
31 | 29 | |
| ||
40 | 38 | |
41 | 39 | |
42 | 40 | |
43 | | - |
| 41 | + |
44 | 42 | |
45 | 43 | |
46 | 44 | |
| ||
99 | 97 | |
100 | 98 | |
101 | 99 | |
102 | | - |
| 100 | + |
103 | 101 | |
104 | 102 | |
105 | 103 | |
|
0 commit comments