fixed crash
This commit is contained in:
parent
408b6009f8
commit
35371480cb
|
@ -40,7 +40,6 @@ public class ErrorUtils {
|
||||||
* @param exception connection exception
|
* @param exception connection exception
|
||||||
* @return message string
|
* @return message string
|
||||||
*/
|
*/
|
||||||
@Nullable
|
|
||||||
public static String getErrorMessage(Context context, @Nullable ConnectionException exception) {
|
public static String getErrorMessage(Context context, @Nullable ConnectionException exception) {
|
||||||
if (exception != null) {
|
if (exception != null) {
|
||||||
switch (exception.getErrorCode()) {
|
switch (exception.getErrorCode()) {
|
||||||
|
@ -126,11 +125,8 @@ public class ErrorUtils {
|
||||||
return exception.getMessage();
|
return exception.getMessage();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
return context.getString(R.string.error_not_defined);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return context.getString(R.string.error_not_defined);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue