We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d4f193 commit a95c016Copy full SHA for a95c016
src/mono/clrfunc.cpp
@@ -375,7 +375,12 @@ v8::Local<v8::Value> ClrFunc::MarshalCLRExceptionToV8(MonoException* exception)
375
376
// Construct an error that is just used for the prototype - not verify efficient
377
// but 'typeof Error' should work in JavaScript
378
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 14)
379
+ result->SetPrototypeV2(Nan::GetCurrentContext(), v8::Exception::Error(message));
380
+#else
381
result->SetPrototype(Nan::GetCurrentContext(), v8::Exception::Error(message));
382
+#endif
383
+
384
result->Set(Nan::GetCurrentContext(), Nan::New<v8::String>("message").ToLocalChecked(), message);
385
386
// Recording the actual type - 'name' seems to be the common used property
0 commit comments