File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
firebase-config/src/main/java/com/google/firebase/remoteconfig Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 21
21
22
22
/** Base class for {@link FirebaseRemoteConfig} exceptions. */
23
23
public class FirebaseRemoteConfigException extends FirebaseException {
24
+ /** Code that specifies the type of exception. */
25
+ private final Code code ;
26
+
24
27
/** Creates a Firebase Remote Config exception with the given message. */
25
28
public FirebaseRemoteConfigException (@ NonNull String detailMessage ) {
26
29
super (detailMessage );
27
- this .code = null ;
30
+ this .code = Code . UNKNOWN ;
28
31
}
29
32
30
33
/** Creates a Firebase Remote Config exception with the given message and cause. */
31
34
public FirebaseRemoteConfigException (@ NonNull String detailMessage , @ Nullable Throwable cause ) {
32
35
super (detailMessage , cause );
33
- this .code = null ;
36
+ this .code = Code . UNKNOWN ;
34
37
}
35
38
36
- /** Code that specifies the type of exception. */
37
- @ Nullable private final Code code ;
38
-
39
39
/** Creates a Firebase Remote Config exception with the given message and Code. */
40
40
public FirebaseRemoteConfigException (@ NonNull String detailMessage , @ NonNull Code code ) {
41
41
super (detailMessage );
@@ -89,10 +89,5 @@ private static SparseArray<Code> buildCodeList() {
89
89
}
90
90
return codes ;
91
91
}
92
-
93
- @ NonNull
94
- public static Code fromValue (int value ) {
95
- return CODE_LIST .get (value , Code .UNKNOWN );
96
- }
97
92
}
98
93
}
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ public void listenForNotifications() {
103
103
} catch (IOException ex ) {
104
104
propagateErrors (
105
105
new FirebaseRemoteConfigClientException (
106
- "Unable to parse ConfigUpdate ." ,
106
+ "Unable to parse config update message ." ,
107
107
ex .getCause (),
108
108
FirebaseRemoteConfigException .Code .CONFIG_UPDATE_MESSAGE_UNAVAILABLE ));
109
109
} finally {
You can’t perform that action at this time.
0 commit comments