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
This commit is contained in:
David Vacca
2021-01-22 18:41:59 -08:00
committed by Facebook GitHub Bot
parent 8d81ae8f2b
commit 505f9fc749
@@ -93,7 +93,13 @@ public class UIManagerHelper {
*/
@Nullable
public static EventDispatcher getEventDispatcherForReactTag(ReactContext context, int reactTag) {
return getEventDispatcher(context, getUIManagerType(reactTag));
EventDispatcher eventDispatcher = getEventDispatcher(context, getUIManagerType(reactTag));
if (eventDispatcher == null) {
ReactSoftException.logSoftException(
"UIManagerHelper",
new IllegalStateException("Cannot get EventDispatcher for reactTag " + reactTag));
}
return eventDispatcher;
}
/**
@@ -112,6 +118,10 @@ public class UIManagerHelper {
}
UIManager uiManager = getUIManager(context, uiManagerType, false);
if (uiManager == null) {
ReactSoftException.logSoftException(
"UIManagerHelper",
new ReactNoCrashSoftException(
"Unable to find UIManager for UIManagerType " + uiManagerType));
return null;
}
EventDispatcher eventDispatcher = (EventDispatcher) uiManager.getEventDispatcher();