orThrow

fun <A> Either<Throwable, A>.orThrow(): A(source)

Retrieves the Right hand of an Either, or throws the Left hand error


fun <A> Result<A>.orThrow(): A(source)

Retrieves the success of a Result, or throws the failure. Alias of getOrThrow, included for consistency with ErrorOr.