MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / ThrowErrorThatEscapesScope

Function ThrowErrorThatEscapesScope

test/error.cc:208–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void ThrowErrorThatEscapesScope(const CallbackInfo& info) {
209 HandleScope scope(info.Env());
210
211 std::string message = info[0].As<String>().Utf8Value();
212 throw Error::New(info.Env(), message);
213}
214
215void CatchAndRethrowErrorThatEscapesScope(const CallbackInfo& info) {
216 HandleScope scope(info.Env());

Callers 1

Calls 2

EnvMethod · 0.80

Tested by

no test coverage detected