Catch any std::exception from unbundling
Reviewed By: davidaurelio Differential Revision: D3148408 fbshipit-source-id: 78dc47e1b092cb7fd06307d505a795d2009cee4d
This commit is contained in:
parent
448b48ca85
commit
05832c3469
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue