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

Method Test

test/objectwrap_removewrap.cc:22–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20class Test : public Napi::ObjectWrap<Test> {
21 public:
22 Test(const Napi::CallbackInfo& info) : Napi::ObjectWrap<Test>(info) {
23#ifdef NAPI_CPP_EXCEPTIONS
24 throw Napi::Error::New(Env(), "Some error");
25#else
26 Napi::Error::New(Env(), "Some error").ThrowAsJavaScriptException();
27#endif
28 }
29
30 static void Initialize(Napi::Env env, Napi::Object exports) {
31 exports.Set("Test", DefineClass(env, "Test", {}));

Callers

nothing calls this directly

Calls 2

EnvClass · 0.85

Tested by

no test coverage detected