File tree 3 files changed +7
-3
lines changed
packages/react-native/ReactAndroid
src/main/java/com/facebook/react/bridge
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
1427
1427
public static final field INSTANCE Lcom/facebook/react/bridge/ReactSoftExceptionLogger$Categories;
1428
1428
public static final field RVG_IS_VIEW_CLIPPED Ljava/lang/String;
1429
1429
public static final field RVG_ON_VIEW_REMOVED Ljava/lang/String;
1430
+ public static final field SOFT_ASSERTIONS Ljava/lang/String;
1430
1431
}
1431
1432
1432
1433
public 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 {
18
18
public object Categories {
19
19
public const val RVG_IS_VIEW_CLIPPED : String = " ReactViewGroup.isViewClipped"
20
20
public const val RVG_ON_VIEW_REMOVED : String = " ReactViewGroup.onViewRemoved"
21
+ public const val SOFT_ASSERTIONS : String = " SoftAssertions"
21
22
}
22
23
23
24
// 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 7
7
8
8
package com.facebook.react.bridge
9
9
10
+ import com.facebook.react.bridge.ReactSoftExceptionLogger.Categories.SOFT_ASSERTIONS
11
+
10
12
/* *
11
13
* Utility class to make assertions that should not hard-crash the app but instead be handled by the
12
14
* Catalyst app [JSExceptionHandler]. See the javadoc on that class for more information about our
@@ -23,7 +25,7 @@ public object SoftAssertions {
23
25
*/
24
26
@JvmStatic
25
27
public fun assertUnreachable (message : String ): Unit {
26
- ReactSoftExceptionLogger .logSoftException(" SoftAssertions " , AssertionException (message))
28
+ ReactSoftExceptionLogger .logSoftException(SOFT_ASSERTIONS , AssertionException (message))
27
29
}
28
30
29
31
/* *
@@ -34,7 +36,7 @@ public object SoftAssertions {
34
36
@JvmStatic
35
37
public fun assertCondition (condition : Boolean , message : String ): Unit {
36
38
if (! condition) {
37
- ReactSoftExceptionLogger .logSoftException(" SoftAssertions " , AssertionException (message))
39
+ ReactSoftExceptionLogger .logSoftException(SOFT_ASSERTIONS , AssertionException (message))
38
40
}
39
41
}
40
42
@@ -46,7 +48,7 @@ public object SoftAssertions {
46
48
public fun <T > assertNotNull (instance : T ? ): T ? {
47
49
if (instance == null ) {
48
50
ReactSoftExceptionLogger .logSoftException(
49
- " SoftAssertions " , AssertionException (" Expected object to not be null!" ))
51
+ SOFT_ASSERTIONS , AssertionException (" Expected object to not be null!" ))
50
52
}
51
53
return instance
52
54
}
You can’t perform that action at this time.
0 commit comments