summaryrefslogtreecommitdiff
path: root/doc/api/n-api.md
diff options
context:
space:
mode:
authorJamen Marzonie <jamenmarz@gmail.com>2017-06-08 05:05:19 -0500
committerBenjamin Gruenbaum <benji@tipranks.com>2017-06-10 17:58:35 +0300
commit252911968002d840c82552b6337bd9430adeb231 (patch)
treeba61c3e9287a357359351599b33438ad7d81f5a8 /doc/api/n-api.md
parent390fa0380e60684c1416afd85773241e3a0d56ff (diff)
downloadnode-new-252911968002d840c82552b6337bd9430adeb231.tar.gz
doc: fix napi_create_*_error signatures in n-api
PR-URL: https://github.com/nodejs/node/pull/13544 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna M. Kedzierska <anna.m.kedzierska@gmail.com> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Diffstat (limited to 'doc/api/n-api.md')
-rw-r--r--doc/api/n-api.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/api/n-api.md b/doc/api/n-api.md
index e0f29eb2fc..bc7f605c13 100644
--- a/doc/api/n-api.md
+++ b/doc/api/n-api.md
@@ -407,7 +407,9 @@ This API queries a `napi_value` to check if it represents an error object.
added: v8.0.0
-->
```C
-NODE_EXTERN napi_status napi_create_error(napi_env env, const char* msg);
+NODE_EXTERN napi_status napi_create_error(napi_env env,
+ const char* msg,
+ napi_value* result);
```
- `[in] env`: The environment that the API is invoked under.
- `[in] msg`: C string representing the text to be associated with.
@@ -422,7 +424,9 @@ This API returns a JavaScript Error with the text provided.
added: v8.0.0
-->
```C
-NODE_EXTERN napi_status napi_create_type_error(napi_env env, const char* msg);
+NODE_EXTERN napi_status napi_create_type_error(napi_env env,
+ const char* msg,
+ napi_value* result);
```
- `[in] env`: The environment that the API is invoked under.
- `[in] msg`: C string representing the text to be associated with.
@@ -438,7 +442,9 @@ This API returns a JavaScript TypeError with the text provided.
added: v8.0.0
-->
```C
-NODE_EXTERN napi_status napi_create_range_error(napi_env env, const char* msg);
+NODE_EXTERN napi_status napi_create_range_error(napi_env env,
+ const char* msg,
+ napi_value* result);
```
- `[in] env`: The environment that the API is invoked under.
- `[in] msg`: C string representing the text to be associated with.