Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Browse Node-APIshow

napi_throw

functionv1js_native_api.h

This API throws the JavaScript value provided.

NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error);
  • [in] env: The environment that the API is invoked under.
  • [in] error: The JavaScript value to be thrown.

Returns napi_ok if the API succeeded.

This API throws the JavaScript value provided.

View in the official Node.js documentation