Skip to content

Commit

Permalink
doc: fix napi_create_*_error signatures in n-api
Browse files Browse the repository at this point in the history
Backport-PR-URL: #19447
PR-URL: #13544
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna M. Kedzierska <[email protected]>
Reviewed-By: Chris Dickinson <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
  • Loading branch information
jamen authored and MylesBorins committed Apr 16, 2018
1 parent 1e25062 commit c5ae39e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit c5ae39e

Please sign in to comment.