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

Function ThrowApiError

test/error.cc:59–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void ThrowApiError(const CallbackInfo& info) {
60 // Attempting to call an empty function value will throw an API error.
61 Function(info.Env(), nullptr).Call(std::initializer_list<napi_value>{});
62}
63
64void LastExceptionErrorCode(const CallbackInfo& info) {
65 // Previously, `napi_extended_error_info.error_code` got reset to `napi_ok` in

Callers

nothing calls this directly

Calls 3

FunctionClass · 0.85
CallMethod · 0.80
EnvMethod · 0.80

Tested by

no test coverage detected