diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java index 430f2478a2b..280034983eb 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java @@ -543,10 +543,12 @@ public class NativeViewHierarchyManager { ViewGroup view, ThemedReactContext themedContext) { if (view.getId() != View.NO_ID) { - throw new IllegalViewOperationException( - "Trying to add a root view with an explicit id already set. React Native uses " + - "the id field to track react tags and will overwrite this field. If that is fine, " + - "explicitly overwrite the id field to View.NO_ID before calling addRootView."); + themedContext.handleException( + new IllegalViewOperationException( + "Trying to add a root view with an explicit id (" + view.getId() + ") already " + + "set. React Native uses the id field to track react tags and will overwrite this field. " + + "If that is fine, explicitly overwrite the id field to View.NO_ID before calling " + + "addRootView.")); } mTagsToViews.put(tag, view);