handleError

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

Handles errors in this IO by recovering with a default value.

Return

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

Parameters

recover

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