Skip to content

Commit 505f9fc

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Add logging to analyze Bug in BottomSheetRootViewGroup
Summary: This diff adds logs and soft errors to analyze task T83470429 changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D26032513 fbshipit-source-id: e6ee3f8a6ac942e794439396e1a9f7d6157d20a5
1 parent 8d81ae8 commit 505f9fc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ private static UIManager getUIManager(
9393
*/
9494
@Nullable
9595
public static EventDispatcher getEventDispatcherForReactTag(ReactContext context, int reactTag) {
96-
return getEventDispatcher(context, getUIManagerType(reactTag));
96+
EventDispatcher eventDispatcher = getEventDispatcher(context, getUIManagerType(reactTag));
97+
if (eventDispatcher == null) {
98+
ReactSoftException.logSoftException(
99+
"UIManagerHelper",
100+
new IllegalStateException("Cannot get EventDispatcher for reactTag " + reactTag));
101+
}
102+
return eventDispatcher;
97103
}
98104

99105
/**
@@ -112,6 +118,10 @@ public static EventDispatcher getEventDispatcher(
112118
}
113119
UIManager uiManager = getUIManager(context, uiManagerType, false);
114120
if (uiManager == null) {
121+
ReactSoftException.logSoftException(
122+
"UIManagerHelper",
123+
new ReactNoCrashSoftException(
124+
"Unable to find UIManager for UIManagerType " + uiManagerType));
115125
return null;
116126
}
117127
EventDispatcher eventDispatcher = (EventDispatcher) uiManager.getEventDispatcher();

0 commit comments

Comments
 (0)