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

Function ThrowSyntaxErrorCStr

test/error.cc:157–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156#if NAPI_VERSION > 8
157void ThrowSyntaxErrorCStr(const CallbackInfo& info) {
158 std::string message = info[0].As<String>().Utf8Value();
159 ReleaseAndWaitForChildProcess(info, 1);
160 throw SyntaxError::New(info.Env(), message.c_str());
161}
162
163void ThrowSyntaxErrorCtor(const CallbackInfo& info) {
164 Napi::Value js_range_err = info[0];

Callers

nothing calls this directly

Calls 3

EnvMethod · 0.80

Tested by

no test coverage detected