| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0350c6f commit 30bb1cc
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2388,6 +2388,16 @@ added: v15.0.0 | |||
| 2388 | 2388 | An operation failed. This is typically used to signal the general failure | |
| 2389 | 2389 | of an asynchronous operation. | |
| 2390 | 2390 | ||
| 2391 | + <a id="ERR_OPTIONS_BEFORE_BOOTSTRAPPING"></a> | ||
| 2392 | + | ||
| 2393 | + ### `ERR_OPTIONS_BEFORE_BOOTSTRAPPING` | ||
| 2394 | + | ||
| 2395 | + <!-- YAML | ||
| 2396 | + added: REPLACEME | ||
| 2397 | + --> | ||
| 2398 | + | ||
| 2399 | + An attempt was made to get options before the bootstrapping was completed. | ||
| 2400 | + | ||
| 2391 | 2401 | <a id="ERR_OUT_OF_RANGE"></a> | |
| 2392 | 2402 | ||
| 2393 | 2403 | ### `ERR_OUT_OF_RANGE` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -105,6 +105,7 @@ void OOMErrorHandler(const char* location, const v8::OOMDetails& details); | |||
| 105 | 105 | V(ERR_MISSING_PLATFORM_FOR_WORKER, Error) \ | |
| 106 | 106 | V(ERR_MODULE_NOT_FOUND, Error) \ | |
| 107 | 107 | V(ERR_NON_CONTEXT_AWARE_DISABLED, Error) \ | |
| 108 | + V(ERR_OPTIONS_BEFORE_BOOTSTRAPPING, Error) \ | ||
| 108 | 109 | V(ERR_OUT_OF_RANGE, RangeError) \ | |
| 109 | 110 | V(ERR_REQUIRE_ASYNC_MODULE, Error) \ | |
| 110 | 111 | 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" | |
@@ -1362,8 +1363,8 @@ void GetCLIOptionsValues(const FunctionCallbackInfo<Value>& args) { | |||
| 1362 | 1363 | ||
| 1363 | 1364 | if (!env->has_run_bootstrapping_code()) { | |
| 1364 | 1365 | // No code because this is an assertion. | |
| 1365 | - return env->ThrowError( | ||
| 1366 | - "Should not query options before bootstrapping is done"); | ||
| 1366 | + THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | ||
| 1367 | + isolate, "Should not query options before bootstrapping is done"); | ||
| 1367 | 1368 | } | |
| 1368 | 1369 | env->set_has_serialized_options(true); | |
| 1369 | 1370 | ||
@@ -1480,8 +1481,8 @@ void GetCLIOptionsInfo(const FunctionCallbackInfo<Value>& args) { | |||
| 1480 | 1481 | ||
| 1481 | 1482 | if (!env->has_run_bootstrapping_code()) { | |
| 1482 | 1483 | // No code because this is an assertion. | |
| 1483 | - return env->ThrowError( | ||
| 1484 | - "Should not query options before bootstrapping is done"); | ||
| 1484 | + THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | ||
| 1485 | + isolate, "Should not query options before bootstrapping is done"); | ||
| 1485 | 1486 | } | |
| 1486 | 1487 | ||
| 1487 | 1488 | Mutex::ScopedLock lock(per_process::cli_options_mutex); | |
@@ -1547,7 +1548,8 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) { | |||
| 1547 | 1548 | Environment* env = Environment::GetCurrent(args); | |
| 1548 | 1549 | if (!env->has_run_bootstrapping_code()) { | |
| 1549 | 1550 | // No code because this is an assertion. | |
| 1550 | - return env->ThrowError( | ||
| 1551 | + THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | ||
| 1552 | + env->isolate(), | ||
| 1551 | 1553 | "Should not query options before bootstrapping is done"); | |
| 1552 | 1554 | } | |
| 1553 | 1555 | Isolate* isolate = args.GetIsolate(); | |
@@ -1583,8 +1585,8 @@ void GetEnvOptionsInputType(const FunctionCallbackInfo<Value>& args) { | |||
| 1583 | 1585 | ||
| 1584 | 1586 | if (!env->has_run_bootstrapping_code()) { | |
| 1585 | 1587 | // No code because this is an assertion. | |
| 1586 | - return env->ThrowError( | ||
| 1587 | - "Should not query options before bootstrapping is done"); | ||
| 1588 | + THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | ||
| 1589 | + isolate, "Should not query options before bootstrapping is done"); | ||
| 1588 | 1590 | } | |
| 1589 | 1591 | ||
| 1590 | 1592 | Mutex::ScopedLock lock(per_process::cli_options_mutex); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments