From 05832c34695080b0791053e7d7652774894d129e Mon Sep 17 00:00:00 2001 From: Marc Horowitz Date: Fri, 13 May 2016 17:14:51 -0700 Subject: [PATCH] Catch any std::exception from unbundling Reviewed By: davidaurelio Differential Revision: D3148408 fbshipit-source-id: 78dc47e1b092cb7fd06307d505a795d2009cee4d --- ReactCommon/bridge/JSCExecutor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {