# Failure

class Failure<out E : Any>(val error: Exception) : SippoService<E>

Failed result with error error.

#### Parameters

E

Type of the error. It has to extend Exception.

## Constructors

Failure
Link copied to clipboard
constructor(error: Exception)

## Properties

error
Link copied to clipboard
val error: Exception

## Functions

error
Link copied to clipboard
open override fun error(): Exception

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

failure
Link copied to clipboard
fun SippoService<*>.failure(f: (Exception) -> Unit)

Calls the function f with a specific error when Either is failure.

success
Link copied to clipboard
fun <V : Any> SippoService<V>.success(f: (V) -> Unit)

Calls the function f with a specific value when SippoService is successful.

value
Link copied to clipboard
open override fun value(): E?

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