Function napi_create_range_error in documentation has prototype:
NODE_EXTERNnapi_statusnapi_create_range_error(napi_envenv,
napi_valuecode,
constchar*msg,
napi_value*result);
where msg has type const char*. But according to node_api.h the prototype should be:
NAPI_EXTERNnapi_statusnapi_create_range_error(napi_envenv,
napi_valuecode,
napi_valuemsg,
napi_value*result);
with msg having type napi_value.
Function napi_create_range_error in documentation has prototype:
where
msghas typeconst char*. But according tonode_api.hthe prototype should be:with
msghaving typenapi_value.