From 53ec50d971c49b392a39847f2c02bf9cf6310964 Mon Sep 17 00:00:00 2001 From: Jamen Marzonie Date: Thu, 8 Jun 2017 05:05:19 -0500 Subject: [PATCH] doc: fix napi_create_*_error signatures in n-api PR-URL: https://github.com/nodejs/node/pull/13544 Reviewed-By: James M Snell Reviewed-By: Anna M. Kedzierska Reviewed-By: Chris Dickinson Reviewed-By: Jason Ginchereau --- doc/api/n-api.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index e0f29eb2fcad6c..bc7f605c13bf80 100644 --- a/doc/api/n-api.md +++ b/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.