Exception

data class Exception(val attempts: Int, val exception: Throwable) : Outcome<Nothing>

An outcome that includes an exception.

Parameters

attempts

The number of attempts executed in order to reach the outcome. Starts at 1.

exception

The exception resulting from the operation.

Constructors

Link copied to clipboard
constructor(attempts: Int, exception: Throwable)

Properties

Link copied to clipboard
open override val attempts: Int
Link copied to clipboard

Inherited functions

Link copied to clipboard
fun <T> Outcome<T>.getOrThrow(): T

Gets the non-exceptional response in this outcome if it exists. Otherwise, throws the exception in this outcome.

Link copied to clipboard
fun <T> Outcome<T>.toResult(): <Error class: unknown class><T>

Convert an outcome to a Result