get Or Throw
inline fun <VALUE> Result<VALUE>.getOrThrow(doBeforeThrow: (Throwable) -> Unit = {}): VALUE
Content copied to clipboard
Returns the encapsulated value if this instance represents Success or throws the encapsulated exception if it is Error.
If Error.error is not CancellationException then doBeforeThrow is called before throw.