Created
February 1, 2017 22:33
-
-
Save cloudshooterhuman/ac089338abb435b148b8995bd7023557 to your computer and use it in GitHub Desktop.
onError
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onError(Throwable e) { | |
getMvpView().hideProgressIndicator(); | |
if (e instanceof IOException || e instanceof HttpException) { | |
mDataManager.getProfiles().subscribe(new Action1<List<Profile>>() { | |
@Override | |
public void call(List<Profile> profiles) { | |
renderProfilesUi(profiles); | |
} | |
}); | |
} else { | |
getMvpView().showError(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment