Created
November 14, 2021 20:16
-
-
Save murattuzel/47ba603479b075baa42933d3fb391b68 to your computer and use it in GitHub Desktop.
Error types.
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
sealed class Failure : IOException() | |
object JsonError : Failure() | |
object UnknownHostError : Failure() | |
object NoConnectivityError : Failure() | |
data class TimeOutError( | |
override val message: String? | |
) : Failure() | |
data class UnknownError( | |
val throwable: Throwable | |
) : Failure() | |
data class HttpError( | |
val code: Int, | |
override val message: String | |
) : Failure() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment