Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix napi_create_*_error signatures in n-api #13544

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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