MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / ThrowJSError

Function ThrowJSError

test/error.cc:104–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102#ifdef NAPI_CPP_EXCEPTIONS
103
104void ThrowJSError(const CallbackInfo& info) {
105 std::string message = info[0].As<String>().Utf8Value();
106
107 ReleaseAndWaitForChildProcess(info, 1);
108 throw Error::New(info.Env(), message);
109}
110
111void ThrowTypeErrorCtor(const CallbackInfo& info) {
112 Napi::Value js_type_error = info[0];

Callers

nothing calls this directly

Calls 3

EnvMethod · 0.80

Tested by

no test coverage detected