| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9fd217d commit d8937f1
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2377,6 +2377,16 @@ added: v15.0.0 | |||
| 2377 | 2377 | An operation failed. This is typically used to signal the general failure | |
| 2378 | 2378 | of an asynchronous operation. | |
| 2379 | 2379 | ||
| 2380 | + <a id="ERR_OPTIONS_BEFORE_BOOTSTRAPPING"></a> | ||
| 2381 | + | ||
| 2382 | + ### `ERR_OPTIONS_BEFORE_BOOTSTRAPPING` | ||
| 2383 | + | ||
| 2384 | + <!-- YAML | ||
| 2385 | + added: REPLACEME | ||
| 2386 | + --> | ||
| 2387 | + | ||
| 2388 | + An attempt was made to get options before the bootstrapping was completed. | ||
| 2389 | + | ||
| 2380 | 2390 | <a id="ERR_OUT_OF_RANGE"></a> | |
| 2381 | 2391 | ||
| 2382 | 2392 | ### `ERR_OUT_OF_RANGE` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,6 +102,7 @@ void OOMErrorHandler(const char* location, const v8::OOMDetails& details); | |||
| 102 | 102 | V(ERR_MODULE_NOT_FOUND, Error) \ | |
| 103 | 103 | V(ERR_NON_CONTEXT_AWARE_DISABLED, Error) \ | |
| 104 | 104 | V(ERR_OPERATION_FAILED, TypeError) \ | |
| 105 | + V(ERR_OPTIONS_BEFORE_BOOTSTRAPPING, Error) \ | ||
| 105 | 106 | V(ERR_OUT_OF_RANGE, RangeError) \ | |
| 106 | 107 | V(ERR_REQUIRE_ASYNC_MODULE, Error) \ | |
| 107 | 108 | V(ERR_SCRIPT_EXECUTION_INTERRUPTED, Error) \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | 4 | #include "env-inl.h" | |
| 5 | 5 | #include "node_binding.h" | |
| 6 | + #include "node_errors.h" | ||
| 6 | 7 | #include "node_external_reference.h" | |
| 7 | 8 | #include "node_internals.h" | |
| 8 | 9 | #include "node_sea.h" | |
@@ -1344,8 +1345,8 @@ void GetCLIOptionsValues(const FunctionCallbackInfo<Value>& args) { | |||
| 1344 | 1345 | ||
| 1345 | 1346 | if (!env->has_run_bootstrapping_code()) { | |
| 1346 | 1347 | // No code because this is an assertion. | |
| 1347 | - return env->ThrowError( | ||
| 1348 | - "Should not query options before bootstrapping is done"); | ||
| 1348 | + THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | ||
| 1349 | + isolate, "Should not query options before bootstrapping is done"); | ||
| 1349 | 1350 | } | |
| 1350 | 1351 | env->set_has_serialized_options(true); | |
| 1351 | 1352 | ||
@@ -1466,8 +1467,8 @@ void GetCLIOptionsInfo(const FunctionCallbackInfo<Value>& args) { | |||
| 1466 | 1467 | ||
| 1467 | 1468 | if (!env->has_run_bootstrapping_code()) { | |
| 1468 | 1469 | // No code because this is an assertion. | |
| 1469 | - return env->ThrowError( | ||
| 1470 | - "Should not query options before bootstrapping is done"); | ||
| 1470 | + THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | ||
| 1471 | + isolate, "Should not query options before bootstrapping is done"); | ||
| 1471 | 1472 | } | |
| 1472 | 1473 | ||
| 1473 | 1474 | Mutex::ScopedLock lock(per_process::cli_options_mutex); | |
@@ -1535,7 +1536,8 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) { | |||
| 1535 | 1536 | Environment* env = Environment::GetCurrent(args); | |
| 1536 | 1537 | if (!env->has_run_bootstrapping_code()) { | |
| 1537 | 1538 | // No code because this is an assertion. | |
| 1538 | - return env->ThrowError( | ||
| 1539 | + THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | ||
| 1540 | + env->isolate(), | ||
| 1539 | 1541 | "Should not query options before bootstrapping is done"); | |
| 1540 | 1542 | } | |
| 1541 | 1543 | Isolate* isolate = args.GetIsolate(); | |
@@ -1571,8 +1573,8 @@ void GetEnvOptionsInputType(const FunctionCallbackInfo<Value>& args) { | |||
| 1571 | 1573 | ||
| 1572 | 1574 | if (!env->has_run_bootstrapping_code()) { | |
| 1573 | 1575 | // No code because this is an assertion. | |
| 1574 | - return env->ThrowError( | ||
| 1575 | - "Should not query options before bootstrapping is done"); | ||
| 1576 | + THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | ||
| 1577 | + isolate, "Should not query options before bootstrapping is done"); | ||
| 1576 | 1578 | } | |
| 1577 | 1579 | ||
| 1578 | 1580 | Mutex::ScopedLock lock(per_process::cli_options_mutex); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments