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
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 addaleax committed Jun 10, 2017
1 parent d51b1c2 commit 53ec50d
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 53ec50d

Please sign in to comment.