getOrThrow

fun getOrThrow(): T

Returns the encapsulated value if this instance represents success or throws IllegalStateException with the failure message if it is failure.