From 103a84b80f39b668e66e609d8e845c72fdff9d81 Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Tue, 5 Dec 2023 00:02:41 +0800 Subject: [PATCH] Revert "[ios] Fix hermes inspector exception is uncaught and crash the app." This reverts commit 2822a4af74e7c4f52b58f0b2e9f6f0abcc5f131c. --- .../ReactCommon/hermes/inspector-modern/Inspector.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h b/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h index ea5d629cc7e3a2..aebeb828d27d66 100644 --- a/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h +++ b/packages/react-native/ReactCommon/hermes/inspector-modern/Inspector.h @@ -372,10 +372,6 @@ 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 {};