summaryrefslogtreecommitdiff
path: root/src/js_native_api_v8.cc
diff options
context:
space:
mode:
authorGabriel Schulhof <gabriel.schulhof@intel.com>2019-06-19 13:11:39 -0700
committerGabriel Schulhof <gabriel.schulhof@intel.com>2019-06-23 11:26:00 -0700
commit7fad0afd2c02496185a5aa5fab750b9d5cbab3bc (patch)
tree855327ee466d241d34d7d30e8bf8caf822aa576b /src/js_native_api_v8.cc
parent7696663691d5b65f032772a0f6179acc59b0a3a2 (diff)
downloadandroid-node-v8-7fad0afd2c02496185a5aa5fab750b9d5cbab3bc.tar.gz
android-node-v8-7fad0afd2c02496185a5aa5fab750b9d5cbab3bc.tar.bz2
android-node-v8-7fad0afd2c02496185a5aa5fab750b9d5cbab3bc.zip
n-api: add error message for date expected
PR-URL: https://github.com/nodejs/node/pull/28303 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/js_native_api_v8.cc')
-rw-r--r--src/js_native_api_v8.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc
index 30f34b474c..2f5a4bf83c 100644
--- a/src/js_native_api_v8.cc
+++ b/src/js_native_api_v8.cc
@@ -676,6 +676,7 @@ const char* error_messages[] = {nullptr,
"Thread-safe function queue is full",
"Thread-safe function handle is closing",
"A bigint was expected",
+ "A date was expected",
};
napi_status napi_get_last_error_info(napi_env env,
@@ -688,7 +689,7 @@ napi_status napi_get_last_error_info(napi_env env,
// We don't have a napi_status_last as this would result in an ABI
// change each time a message was added.
static_assert(
- NAPI_ARRAYSIZE(error_messages) == napi_bigint_expected + 1,
+ NAPI_ARRAYSIZE(error_messages) == napi_date_expected + 1,
"Count of error messages must match count of error values");
CHECK_LE(env->last_error.error_code, napi_callback_scope_mismatch);