Failure

sealed class Failure : Throwable

This class allows to expose different kinds of error to be then handled by the application. As it is a sealed class, you typically use it like that : when(failure) { is NetworkConnection -> Unit is ServerError -> Unit is Unknown -> Unit }

Types

Link copied to clipboard
data class CryptoError(val error: MXCryptoError) : Failure
Link copied to clipboard
abstract class FeatureFailure : Failure
Link copied to clipboard
data class NetworkConnection(val ioException: IOException? = null) : Failure
Link copied to clipboard
data class OtherServerError(val errorBody: String, val httpCode: Int) : Failure

When server send an error, but it cannot be interpreted as a MatrixError.

Link copied to clipboard
data class RegistrationFlowError(val registrationFlowResponse: RegistrationFlowResponse) : Failure
Link copied to clipboard
data class ServerError(val error: MatrixError, val httpCode: Int) : Failure
Link copied to clipboard
object SuccessError : Failure
Link copied to clipboard
data class Unknown(val throwable: Throwable? = null) : Failure
Link copied to clipboard
data class UnrecognizedCertificateFailure(val url: String, val fingerprint: Fingerprint) : Failure

Functions

Link copied to clipboard
fun addSuppressed(p0: Throwable)
Link copied to clipboard
open fun fillInStackTrace(): Throwable
Link copied to clipboard
open fun getLocalizedMessage(): String
Link copied to clipboard
open fun getStackTrace(): Array<StackTraceElement>
Link copied to clipboard
fun getSuppressed(): Array<Throwable>
Link copied to clipboard
open fun initCause(p0: Throwable): Throwable
Link copied to clipboard
open fun printStackTrace()
open fun printStackTrace(p0: PrintStream)
open fun printStackTrace(p0: PrintWriter)
Link copied to clipboard
open fun setStackTrace(p0: Array<StackTraceElement>)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard