From ff9c8cdac9b1734ad5f193116880b7b91e08bc6e Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Wed, 14 Jul 2021 11:19:50 -0700 Subject: [PATCH] Downgrade warning about non-clippable views being clipped to no-crash exception Summary: This is crashing too much in debug, which is good signal but making it harder to test, and test unrelated features. We have some good data about this internally and validated that it's useful; we can follow up on the logged soft exceptions without actually crashing now. Changelog: [Internal] Differential Revision: D29698447 fbshipit-source-id: 61387c18f17f76e5de60baa1fd3c94028229c0f6 --- .../java/com/facebook/react/views/view/ReactViewGroup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java index 021bfeef758..091c9a247b4 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java @@ -29,6 +29,7 @@ import androidx.annotation.Nullable; import com.facebook.common.logging.FLog; import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.ReactContext; +import com.facebook.react.bridge.ReactNoCrashSoftException; import com.facebook.react.bridge.ReactSoftException; import com.facebook.react.bridge.UiThreadUtil; import com.facebook.react.common.annotations.VisibleForTesting; @@ -575,7 +576,7 @@ public class ReactViewGroup extends ViewGroup if (!child.isShown()) { ReactSoftException.logSoftException( TAG, - new IllegalViewOperationException( + new ReactNoCrashSoftException( "Child view has been added to Parent view in which it is clipped and not visible." + " This is not legal for this particular child view. Child: [" + child.getId()