getOrElse

fun <R, T : R> Resultat<T>.getOrElse(onFailure: (exception: Throwable) -> R): R

Returns the encapsulated value if this instance represents success or the result of onFailure function for the encapsulated Throwable exception if it is failure or is loading.

Note, that this function rethrows any Throwable exception thrown by onFailure function.