getOrThrow

fun getOrThrow(): T

Throws the exception if the result is a failure and returns the result in the opposite situation.

Return

the value if present.

Throws

if the result is a failure.