From e58add29a07c6b0989abff0cccfb61dc35fe420e Mon Sep 17 00:00:00 2001 From: David Vacca Date: Sat, 8 Jul 2023 16:10:15 -0700 Subject: [PATCH] Mark ReactJsExceptionHandler to require UnstableReactNativeAPI (#38250) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38250 This diff marks ReactJsExceptionHandler to require UnstableReactNativeAPI annotation changelog: [internal] internal Reviewed By: christophpurrer Differential Revision: D47304094 fbshipit-source-id: 93f39422b21925770b99fcf41e004b47d6649c14 --- .../interfaces/exceptionmanager/ReactJsExceptionHandler.kt | 2 ++ .../main/java/com/facebook/react/uiapp/RNTesterApplication.java | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/interfaces/exceptionmanager/ReactJsExceptionHandler.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/interfaces/exceptionmanager/ReactJsExceptionHandler.kt index f1f5750ab72164..ce80a2861796a1 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/interfaces/exceptionmanager/ReactJsExceptionHandler.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/interfaces/exceptionmanager/ReactJsExceptionHandler.kt @@ -8,9 +8,11 @@ package com.facebook.react.interfaces.exceptionmanager import com.facebook.proguard.annotations.DoNotStripAny +import com.facebook.react.common.annotations.UnstableReactNativeAPI import com.facebook.react.common.mapbuffer.ReadableMapBuffer @DoNotStripAny +@UnstableReactNativeAPI fun interface ReactJsExceptionHandler { fun reportJsException(errorMap: ReadableMapBuffer?) } diff --git a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java index 958951fdc58a52..19b4823da57d38 100644 --- a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java +++ b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java @@ -192,6 +192,7 @@ public ReactHostInterface getReactHostInterface() { return mReactHost; } + @UnstableReactNativeAPI public static class RNTesterReactJsExceptionHandler implements ReactJsExceptionHandler { public void reportJsException(ReadableMapBuffer errorMap) {} }