File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
packages/react-native/ReactAndroid
src/main/java/com/facebook/react/bridge Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1427,6 +1427,7 @@ public final class com/facebook/react/bridge/ReactSoftExceptionLogger$Categories
14271427 public static final field INSTANCE Lcom/facebook/react/bridge/ReactSoftExceptionLogger$Categories;
14281428 public static final field RVG_IS_VIEW_CLIPPED Ljava/lang/String;
14291429 public static final field RVG_ON_VIEW_REMOVED Ljava/lang/String;
1430+ public static final field SOFT_ASSERTIONS Ljava/lang/String;
14301431}
14311432
14321433public abstract interface class com/facebook/react/bridge/ReactSoftExceptionLogger$ReactSoftExceptionListener {
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ public object ReactSoftExceptionLogger {
1818 public object Categories {
1919 public const val RVG_IS_VIEW_CLIPPED : String = " ReactViewGroup.isViewClipped"
2020 public const val RVG_ON_VIEW_REMOVED : String = " ReactViewGroup.onViewRemoved"
21+ public const val SOFT_ASSERTIONS : String = " SoftAssertions"
2122 }
2223
2324 // Use a list instead of a set here because we expect the number of listeners
Original file line number Diff line number Diff line change 77
88package com.facebook.react.bridge
99
10+ import com.facebook.react.bridge.ReactSoftExceptionLogger.Categories.SOFT_ASSERTIONS
11+
1012/* *
1113 * Utility class to make assertions that should not hard-crash the app but instead be handled by the
1214 * Catalyst app [JSExceptionHandler]. See the javadoc on that class for more information about our
@@ -23,7 +25,7 @@ public object SoftAssertions {
2325 */
2426 @JvmStatic
2527 public fun assertUnreachable (message : String ): Unit {
26- ReactSoftExceptionLogger .logSoftException(" SoftAssertions " , AssertionException (message))
28+ ReactSoftExceptionLogger .logSoftException(SOFT_ASSERTIONS , AssertionException (message))
2729 }
2830
2931 /* *
@@ -34,7 +36,7 @@ public object SoftAssertions {
3436 @JvmStatic
3537 public fun assertCondition (condition : Boolean , message : String ): Unit {
3638 if (! condition) {
37- ReactSoftExceptionLogger .logSoftException(" SoftAssertions " , AssertionException (message))
39+ ReactSoftExceptionLogger .logSoftException(SOFT_ASSERTIONS , AssertionException (message))
3840 }
3941 }
4042
@@ -46,7 +48,7 @@ public object SoftAssertions {
4648 public fun <T > assertNotNull (instance : T ? ): T ? {
4749 if (instance == null ) {
4850 ReactSoftExceptionLogger .logSoftException(
49- " SoftAssertions " , AssertionException (" Expected object to not be null!" ))
51+ SOFT_ASSERTIONS , AssertionException (" Expected object to not be null!" ))
5052 }
5153 return instance
5254 }
You can’t perform that action at this time.
0 commit comments