diff --git a/ReactCommon/bridge/JSCExecutor.cpp b/ReactCommon/bridge/JSCExecutor.cpp index 2419348db..2d1ed987c 100644 --- a/ReactCommon/bridge/JSCExecutor.cpp +++ b/ReactCommon/bridge/JSCExecutor.cpp @@ -489,7 +489,7 @@ JSValueRef JSCExecutor::nativeRequire( if (moduleId <= (double) std::numeric_limits::max() && moduleId >= 0.0) { try { loadModule(moduleId); - } catch (JSModulesUnbundle::ModuleNotFound&) { + } catch (const std::exception&) { throw std::invalid_argument(folly::to("Received invalid module ID: ", moduleId)); } } else {