Skip to content

Instantly share code, notes, and snippets.

@michalbujalski
Created January 21, 2019 06:45
Show Gist options
  • Save michalbujalski/1c3179c35d6cae197b7c0f98b4a7b12b to your computer and use it in GitHub Desktop.
Save michalbujalski/1c3179c35d6cae197b7c0f98b4a7b12b to your computer and use it in GitHub Desktop.
view.hideProgress()
when(it){
is NoConnectionException -> view.showNoConnectionError()
is ApiException -> view.showError(it.msg)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment