Skip to content

Commit f81a721

Browse files
mateoguzmanafacebook-github-bot
authored andcommitted
Make DebugServerException internal (#51140)
Summary: This class can be internalized as part of the initiative to reduce the public API surface. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.common.DebugServerException). ## Changelog: [INTERNAL] - Make com.facebook.react.common.DebugServerException internal Pull Request resolved: #51140 Test Plan: ```bash yarn test-android yarn android ``` Reviewed By: javache Differential Revision: D74309486 Pulled By: rshest fbshipit-source-id: 092ffb350d9093deb6b12ad639dd7453027c4c06
1 parent 12fb101 commit f81a721

2 files changed

Lines changed: 8 additions & 25 deletions

File tree

packages/react-native/ReactAndroid/api/ReactAndroid.api

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,23 +1691,6 @@ public final class com/facebook/react/bridge/queue/ReactQueueConfigurationSpec$C
16911691
public final fun createDefault ()Lcom/facebook/react/bridge/queue/ReactQueueConfigurationSpec;
16921692
}
16931693

1694-
public final class com/facebook/react/common/DebugServerException : java/lang/RuntimeException {
1695-
public static final field Companion Lcom/facebook/react/common/DebugServerException$Companion;
1696-
public fun <init> (Ljava/lang/String;)V
1697-
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
1698-
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
1699-
public final fun getOriginalMessage ()Ljava/lang/String;
1700-
public static final fun makeGeneric (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)Lcom/facebook/react/common/DebugServerException;
1701-
public static final fun makeGeneric (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)Lcom/facebook/react/common/DebugServerException;
1702-
public static final fun parse (Ljava/lang/String;Ljava/lang/String;)Lcom/facebook/react/common/DebugServerException;
1703-
}
1704-
1705-
public final class com/facebook/react/common/DebugServerException$Companion {
1706-
public final fun makeGeneric (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)Lcom/facebook/react/common/DebugServerException;
1707-
public final fun makeGeneric (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)Lcom/facebook/react/common/DebugServerException;
1708-
public final fun parse (Ljava/lang/String;Ljava/lang/String;)Lcom/facebook/react/common/DebugServerException;
1709-
}
1710-
17111694
public class com/facebook/react/common/JavascriptException : java/lang/RuntimeException {
17121695
public fun <init> (Ljava/lang/String;)V
17131696
public final fun getExtraDataAsJson ()Ljava/lang/String;

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/DebugServerException.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import org.json.JSONObject
1616
* Tracks errors connecting to or received from the debug server. The debug server returns errors as
1717
* json objects. This exception represents that error.
1818
*/
19-
public class DebugServerException : RuntimeException {
19+
internal class DebugServerException : RuntimeException {
2020

21-
public val originalMessage: String
21+
val originalMessage: String
2222

2323
private constructor(
2424
description: String,
@@ -29,18 +29,18 @@ public class DebugServerException : RuntimeException {
2929
originalMessage = description
3030
}
3131

32-
public constructor(description: String) : super(description) {
32+
constructor(description: String) : super(description) {
3333
originalMessage = description
3434
}
3535

36-
public constructor(
36+
constructor(
3737
detailMessage: String,
3838
throwable: Throwable?,
3939
) : super(detailMessage, throwable) {
4040
originalMessage = detailMessage
4141
}
4242

43-
public companion object {
43+
companion object {
4444
private val GENERIC_ERROR_MESSAGE =
4545
"""
4646
|
@@ -57,11 +57,11 @@ public class DebugServerException : RuntimeException {
5757
.trimMargin()
5858

5959
@JvmStatic
60-
public fun makeGeneric(url: String, reason: String, t: Throwable?): DebugServerException =
60+
fun makeGeneric(url: String, reason: String, t: Throwable?): DebugServerException =
6161
makeGeneric(url, reason, "", t)
6262

6363
@JvmStatic
64-
public fun makeGeneric(
64+
fun makeGeneric(
6565
url: String,
6666
reason: String,
6767
extra: String,
@@ -80,7 +80,7 @@ public class DebugServerException : RuntimeException {
8080
*/
8181
@JvmStatic
8282
@Suppress("UNUSED_PARAMETER")
83-
public fun parse(url: String?, str: String?): DebugServerException? {
83+
fun parse(url: String?, str: String?): DebugServerException? {
8484
if (str.isNullOrEmpty()) {
8585
return null
8686
}

0 commit comments

Comments
 (0)