Created
March 20, 2017 09:16
-
-
Save Fi5t/1501b0b5145f09e3d20ee5d7f0fce789 to your computer and use it in GitHub Desktop.
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
... | |
private fun processServerException(exception: ServerException) { | |
viewState.showError(exception.description) | |
when (exception.code) { | |
ErrorCode.INVALID_CREDENTIALS -> invalidCredentialsCallback() | |
ErrorCode.AUTHENTICATION_REQUIRED -> authenticationRequiredCallback() | |
ErrorCode.UNKNOWN -> unknownServerErrorCallback() | |
} | |
} | |
... | |
open fun invalidCredentialsCallback() {} | |
open fun authenticationRequiredCallback() {} | |
open fun unknownServerErrorCallback() {} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment