coerceToFailure

infix inline fun <Ok, Error> Outcome<Ok, Error>.coerceToFailure(falter: (Ok) -> Error): Failure<Error>

Coerces this Outcome to a Failure.

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

Parameters

falter

Converts the Ok value into an Error value.

See also