Catch any std::exception from unbundling

Reviewed By: davidaurelio

Differential Revision: D3148408

fbshipit-source-id: 78dc47e1b092cb7fd06307d505a795d2009cee4d
This commit is contained in:
Marc Horowitz 2016-05-13 17:14:51 -07:00 committed by Facebook Github Bot 8
parent 448b48ca85
commit 05832c3469
1 changed files with 1 additions and 1 deletions

View File

@ -489,7 +489,7 @@ JSValueRef JSCExecutor::nativeRequire(
if (moduleId <= (double) std::numeric_limits<uint32_t>::max() && moduleId >= 0.0) {
try {
loadModule(moduleId);
} catch (JSModulesUnbundle::ModuleNotFound&) {
} catch (const std::exception&) {
throw std::invalid_argument(folly::to<std::string>("Received invalid module ID: ", moduleId));
}
} else {