Browse Source

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>
v6
Jamen Marzonie 8 years ago
committed by Benjamin Gruenbaum
parent
commit
2529119680
  1. 12
      doc/api/n-api.md

12
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.

Loading…
Cancel
Save