From 8e8d2735b8354e811116aaa502b0165ab216b10f Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 29 Oct 2024 15:01:53 +0000 Subject: [PATCH] [RN][JS] Fix setUpErrorHandling to show early JS errors --- .../Libraries/AppDelegate/React-RCTAppDelegate.podspec | 2 +- packages/react-native/Libraries/Core/setUpErrorHandling.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec index e9e16bcbbe1ecd..d7607313eb0f5a 100644 --- a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +++ b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec @@ -63,7 +63,7 @@ Pod::Spec.new do |s| "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), "DEFINES_MODULE" => "YES" } - s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""} + s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Private/Yoga\""} s.dependency "React-Core" s.dependency "RCT-Folly", folly_version diff --git a/packages/react-native/Libraries/Core/setUpErrorHandling.js b/packages/react-native/Libraries/Core/setUpErrorHandling.js index d1aaad73794060..e7650ead7d3690 100644 --- a/packages/react-native/Libraries/Core/setUpErrorHandling.js +++ b/packages/react-native/Libraries/Core/setUpErrorHandling.js @@ -21,13 +21,7 @@ ExceptionsManager.installConsoleErrorReporter(); if (!global.__fbDisableExceptionsManager) { const handleError = (e: mixed, isFatal: boolean) => { try { - // TODO(T196834299): We should really use a c++ turbomodule for this - if ( - !global.RN$handleException || - !global.RN$handleException(e, isFatal) - ) { ExceptionsManager.handleException(e, isFatal); - } } catch (ee) { console.log('Failed to print error: ', ee.message); throw e;