sippo-sdk / com.quobis.sippo.sipposdk.common / Either / Failure

Failure

data class Failure<out E : Throwable> : Either<Nothing, E>

Failed result with error error.

Parameters

E - Type of the error. It has to extend Throwable.

Constructors

<init>

Failure(error: E)

Failed result with error error.

Properties

error

val error: E

Inherited Properties

isFailure

val isFailure: Boolean

True if the result is an error, false otherwise.

isSuccess

val isSuccess: Boolean

True if the result was successful, false otherwise.

Functions

error

fun error(): E

Returns the error associated. In case of Success, error will be null.

value

fun value(): Nothing?

Returns the value associated. In case of Failure, value will be null.