coerceToSuccess

infix inline fun <Ok, Error> Outcome<Ok, Error>.coerceToSuccess(recover: (Error) -> Ok): Success<Ok>

Coerces this Outcome to a Success.

Warning: No RaiseScope is provided — exceptions thrown inside recover propagate uncaught. Wrap with outcomeOf if needed.

Parameters

recover

Converts the Error value into an Ok value.

See also