| 55 | } |
| 56 | |
| 57 | Value CreateExternalWithFinalizeException(const CallbackInfo& info) { |
| 58 | return External<int>::New(info.Env(), new int(1), [](Env env, int* data) { |
| 59 | Error error = Error::New(env, "Finalizer exception"); |
| 60 | delete data; |
| 61 | #ifdef NAPI_CPP_EXCEPTIONS |
| 62 | throw error; |
| 63 | #else |
| 64 | error.ThrowAsJavaScriptException(); |
| 65 | #endif |
| 66 | }); |
| 67 | } |
| 68 | |
| 69 | } // end anonymous namespace |
| 70 |
nothing calls this directly
no test coverage detected