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 ae24ee2 commit 0902380Copy full SHA for 0902380
1 file changed
src/jni/Module.cpp
@@ -192,7 +192,12 @@ void Module::Load(const string& path)
192
auto globalObject = context->Global();
193
auto require = globalObject->Get(context, ConvertToV8String("require")).ToLocalChecked().As<Function>();
194
Local<Value> args[] = { ConvertToV8String(path) };
195
+ TryCatch tc;
196
require->Call(context, globalObject, 1, args);
197
+ if (tc.HasCaught())
198
+ {
199
+ throw NativeScriptException(tc, "Fail to load module: " + path);
200
+ }
201
}
202
203
Local<Object> Module::LoadImpl(const string& path, bool& isData)
0 commit comments