catchDefect<E2> method
Catch any Defect's that may occur on this ZIO. The result will be replaced by executing the ZIO resulting from the given function.
Implementation
ZIO<R, E2, A> catchDefect<E2>(
ZIO<R, E2, A> Function(Defect<E> _) f,
) =>
_mapCauseFOr(
(ctx, _) =>
_ is Defect<E> ? f(_).unsafeRun(ctx) : Either.left(_.lift()),
);