getOrThrow

Returns the carried value, throwing the failure in its place.

This gives up what the return type was for, so reach for it where the caller above this one is the one holding the failure path - a transaction block, a test - rather than as the default way to read a result.

Return

The value on success.

Throws

The carried failure, where there is one.