Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 53ec50d

Browse filesBrowse files
jamenaddaleax
authored andcommitted
doc: fix napi_create_*_error signatures in n-api
PR-URL: #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>
1 parent d51b1c2 commit 53ec50d
Copy full SHA for 53ec50d

File tree

Expand file treeCollapse file tree

1 file changed

+9
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/n-api.md‎

Copy file name to clipboardExpand all lines: doc/api/n-api.md
+9-3Lines changed: 9 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,9 @@ This API queries a `napi_value` to check if it represents an error object.
407407
added: v8.0.0
408408
-->
409409
```C
410-
NODE_EXTERN napi_status napi_create_error(napi_env env, const char* msg);
410+
NODE_EXTERN napi_status napi_create_error(napi_env env,
411+
const char* msg,
412+
napi_value* result);
411413
```
412414
- `[in] env`: The environment that the API is invoked under.
413415
- `[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.
422424
added: v8.0.0
423425
-->
424426
```C
425-
NODE_EXTERN napi_status napi_create_type_error(napi_env env, const char* msg);
427+
NODE_EXTERN napi_status napi_create_type_error(napi_env env,
428+
const char* msg,
429+
napi_value* result);
426430
```
427431
- `[in] env`: The environment that the API is invoked under.
428432
- `[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.
438442
added: v8.0.0
439443
-->
440444
```C
441-
NODE_EXTERN napi_status napi_create_range_error(napi_env env, const char* msg);
445+
NODE_EXTERN napi_status napi_create_range_error(napi_env env,
446+
const char* msg,
447+
napi_value* result);
442448
```
443449
- `[in] env`: The environment that the API is invoked under.
444450
- `[in] msg`: C string representing the text to be associated with.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.