Skip to content

Commit

Permalink
Add logging to analyze Bug in BottomSheetRootViewGroup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mdvacca authored and facebook-github-bot committed Jan 23, 2021
1 parent 8d81ae8 commit 505f9fc
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ private static UIManager getUIManager(
*/
@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;
}

/**
Expand All @@ -112,6 +118,10 @@ public static EventDispatcher getEventDispatcher(
}
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();
Expand Down

0 comments on commit 505f9fc

Please sign in to comment.