flatMapThrowable<B> method
ZIO<R, E, B>
flatMapThrowable<B>(
- FutureOr<
B> f(- A _
- E onThrow(
- dynamic error,
- StackTrace stack
A variant of flatMap that uses the result of the given function. If the given
function throws an error, the resulting ZIO will fail with the result of
onThrow
.
Implementation
ZIO<R, E, B> flatMapThrowable<B>(
FutureOr<B> Function(A _) f,
E Function(dynamic error, StackTrace stack) onThrow,
) =>
flatMap((a) => ZIO.tryCatch(() => f(a), onThrow));