diff --git a/packages/react-native/ReactCommon/hermes/inspector/Inspector.h b/packages/react-native/ReactCommon/hermes/inspector/Inspector.h index 672bfad6b4a0ff..0f6a3ed0503ded 100644 --- a/packages/react-native/ReactCommon/hermes/inspector/Inspector.h +++ b/packages/react-native/ReactCommon/hermes/inspector/Inspector.h @@ -372,6 +372,10 @@ std::optional runUserCallback(C &cb, A &&...arg) { cb(std::forward(arg)...); } catch (const std::exception &e) { return UserCallbackException(e); + } catch (const std::runtime_error &e) { + // NOTE(kudo): Adding this to catch Hermes inspector exceptions after SDK 49. + // I still not figure out why the std::runtime_error is not catched by the std::exception above. + return UserCallbackException(e); } return {};