getOrThrow

Returns the value if the result is Success, or throws an exception if it is Failure.

Use with caution - this method breaks safe error processing. Prefer map, onSuccess, onFailure or getOrElse when possible.

Return

Value of type T from Success.

Throws

if the result is Failure.