summaryrefslogtreecommitdiff
path: root/doc/api/n-api.md
diff options
context:
space:
mode:
authorGabriel Schulhof <gabriel.schulhof@intel.com>2018-04-29 16:49:30 -0400
committerGabriel Schulhof <gabriel.schulhof@intel.com>2018-05-02 09:23:38 -0400
commitbdf5be98dd901f6c312938198439dbda0b20d517 (patch)
tree3be2540235dd45e6c179ed8d0e315d0f96e70abc /doc/api/n-api.md
parent9c8b479467a5f2b68f967444fbc2f7528082ab23 (diff)
downloadandroid-node-v8-bdf5be98dd901f6c312938198439dbda0b20d517.tar.gz
android-node-v8-bdf5be98dd901f6c312938198439dbda0b20d517.tar.bz2
android-node-v8-bdf5be98dd901f6c312938198439dbda0b20d517.zip
n-api: test and doc napi_throw() of a primitive
Ensure that napi_throw() is able to throw a primitive value, and document that it is able to throw any JavaScript value. Fixes: https://github.com/nodejs/abi-stable-node/issues/309 PR-URL: https://github.com/nodejs/node/pull/20428 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/n-api.md')
-rw-r--r--doc/api/n-api.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/n-api.md b/doc/api/n-api.md
index 85993639dc..fcbd4decb3 100644
--- a/doc/api/n-api.md
+++ b/doc/api/n-api.md
@@ -344,11 +344,11 @@ added: v8.0.0
NODE_EXTERN napi_status napi_throw(napi_env env, napi_value error);
```
- `[in] env`: The environment that the API is invoked under.
-- `[in] error`: The `napi_value` for the `Error` to be thrown.
+- `[in] error`: The JavaScript value to be thrown.
Returns `napi_ok` if the API succeeded.
-This API throws the JavaScript `Error` provided.
+This API throws the JavaScript value provided.
#### napi_throw_error
<!-- YAML