| 20 | class 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", {})); |
nothing calls this directly
no test coverage detected