get Or Throw
Returns the value if this Result is Ok, otherwise throws the error.
This is functionally equivalent to getOrElse { throw it }.
infix inline fun <V, E> Result<V, E>.getOrThrow(transform: (E) -> Throwable): V
Content copied to clipboard
Returns the value if this Result is Ok, otherwise throws the transformation of the error to a Throwable.