Commit cc74821
bootstrap: print stack trace during environment creation failure
#45888 took the environment
creation code out of the scope covered by the v8::TryCatch
that we use to print early failures during environment creation.
So e.g. when adding something that would fail in node.js, we get
```
node:internal/options:554: Uncaught Error: Should not query options before bootstrapping is done
```
This patch restores that by adding another v8::TryCatch for it:
```
node:internal/options:20
({ options: optionsMap } = getCLIOptions());
^
Error: Should not query options before bootstrapping is done
at getCLIOptionsFromBinding (node:internal/options:20:32)
at getOptionValue (node:internal/options:45:19)
at node:internal/bootstrap/node:433:29
```
PR-URL: #46533
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent 724f9d6 commit cc74821Copy full SHA for cc74821
File tree
Expand file treeCollapse file tree
3 files changed
+69
-25
lines changedOpen diff view settings
Filter options
- src
- api
Expand file treeCollapse file tree
3 files changed
+69
-25
lines changedOpen diff view settings
Collapse file
+11-1Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
15 | 15 | |
16 | 16 | |
17 | 17 | |
| 18 | + |
18 | 19 | |
19 | 20 | |
20 | 21 | |
| ||
129 | 130 | |
130 | 131 | |
131 | 132 | |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
132 | 143 | |
133 | 144 | |
134 | 145 | |
135 | 146 | |
136 | 147 | |
137 | | - |
138 | 148 | |
139 | 149 | |
140 | 150 | |
|
Collapse file
+55-24Lines changed: 55 additions & 24 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
185 | 185 | |
186 | 186 | |
187 | 187 | |
188 | | - |
| 188 | + |
| 189 | + |
189 | 190 | |
190 | 191 | |
191 | 192 | |
| ||
195 | 196 | |
196 | 197 | |
197 | 198 | |
198 | | - |
| 199 | + |
199 | 200 | |
200 | | - |
201 | | - |
202 | | - |
203 | | - |
204 | | - |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
205 | 209 | |
206 | 210 | |
207 | 211 | |
208 | 212 | |
209 | 213 | |
210 | | - |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
211 | 222 | |
212 | | - |
213 | | - |
214 | | - |
215 | | - |
216 | | - |
217 | | - |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
218 | 232 | |
219 | 233 | |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
220 | 239 | |
221 | 240 | |
222 | 241 | |
223 | | - |
224 | | - |
225 | | - |
226 | | - |
| 242 | + |
| 243 | + |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
227 | 250 | |
228 | 251 | |
229 | 252 | |
230 | 253 | |
231 | 254 | |
232 | 255 | |
233 | | - |
234 | | - |
| 256 | + |
235 | 257 | |
236 | 258 | |
237 | | - |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
238 | 269 | |
239 | 270 | |
240 | 271 | |
241 | 272 | |
242 | 273 | |
243 | | - |
244 | | - |
| 274 | + |
245 | 275 | |
246 | 276 | |
247 | 277 | |
| ||
1089 | 1119 | |
1090 | 1120 | |
1091 | 1121 | |
1092 | | - |
| 1122 | + |
| 1123 | + |
1093 | 1124 | |
1094 | 1125 | |
1095 | 1126 | |
|
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
83 | 83 | |
84 | 84 | |
85 | 85 | |
| 86 | + |
| 87 | + |
| 88 | + |
86 | 89 | |
87 | 90 | |
88 | 91 | |
|
0 commit comments