/** * Switches over to the stream produced by the provided function in case this * one fails with some errors. Allows recovery from all causes of failure, * including interruption if the stream is uninterruptible. * * @tsplus static effect/core/stream/Stream.Aspects catchSomeCause * @tsplus pipeable effect/core/stream/Stream catchSomeCause */ export function catchSomeCause( pf: (cause: Cause) => Maybe> ) { return (self: Stream): Stream => self.catchAllCause( (cause): Stream => pf(cause).getOrElse(Stream.failCause(cause)) ) }