| 164 | } |
| 165 | |
| 166 | void ModuleInternal::RequireCallback(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 167 | try { |
| 168 | auto thiz = static_cast<ModuleInternal*>(args.Data().As<External>()->Value()); |
| 169 | thiz->RequireCallbackImpl(args); |
| 170 | } catch (NativeScriptException& e) { |
| 171 | e.ReThrowToV8(); |
| 172 | } catch (std::exception e) { |
| 173 | stringstream ss; |
| 174 | ss << "Error: c++ exception: " << e.what() << endl; |
| 175 | NativeScriptException nsEx(ss.str()); |
| 176 | nsEx.ReThrowToV8(); |
| 177 | } catch (...) { |
| 178 | NativeScriptException nsEx(std::string("Error: c++ exception!")); |
| 179 | nsEx.ReThrowToV8(); |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | void ModuleInternal::RequireCallbackImpl(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 184 | auto isolate = args.GetIsolate(); |
nothing calls this directly
no test coverage detected