recoverWith

open override fun recoverWith(recover: suspend (Throwable) -> Effect<A>): IO<A>

Handles errors in this IO by recovering with another Effect.

Return

A new IO that recovers from errors with the provided Effect.

Parameters

recover

The function that provides a fallback Effect of type A if the computation fails.