handling errors
handleError
Stream('a', 'b', 'c')
.evalTap(x => IO.raiseWhen(x == 'b')(Err))
.handleError(_ => 'd')
.compile
.toList
handleError (with chunks)
Stream('a', 'b', 'c')
.evalTap(x => IO.raiseWhen(x == 'b')(Err))
.handleError(_ => 'd')
.compile
.toList
handleError2
Stream('a', 'b', 'c')
.evalMap(x => IO.raiseWhen(x == 'b')(Err).as(x).handleError(_ => 'd'))
.handleError(_ => 'd')
.compile
.toList
handleError2 (with chunks)
Stream('a', 'b', 'c')
.evalMap(x => IO.raiseWhen(x == 'b')(Err).as(x).handleError(_ => 'd'))
.handleError(_ => 'd')
.compile
.toList
handleErrorWith
Stream('a', 'b', 'c')
.evalTap(x => IO.raiseWhen(x == 'b')(Err))
.handleErrorWith(_ => Stream('d', 'e', 'f'))
.compile
.toList
handleErrorWith (with chunks)
Stream('a', 'b', 'c')
.evalTap(x => IO.raiseWhen(x == 'b')(Err))
.handleErrorWith(_ => Stream('d', 'e', 'f'))
.compile
.toList
attempt
Stream('a', 'b', 'c')
.evalTap(x => IO.raiseWhen(x == 'b')(Err))
.attempt
.compile
.toList
attempt (with chunks)
Stream('a', 'b', 'c')
.evalTap(x => IO.raiseWhen(x == 'b')(Err))
.attempt
.compile
.toList
attempts
Stream('a', 'b', 'c')
.evalTap(x => IO.raiseWhen(x == 'b')(Err))
.attempts(Stream.empty)
.take(4)
.compile
.toList
attempts (with chunks)
Stream('a', 'b', 'c')
.evalTap(x => IO.raiseWhen(x == 'b')(Err))
.attempts(Stream.empty)
.take(4)
.compile
.toList