recover

Allow sending of one last element downstream when a failure has happened upstream.

Simple operators

Signature

def recover[T >: Out](pf: PartialFunction[Throwable, T]): Repr[T]

Description

Allow sending of one last element downstream when a failure has happened upstream.

Throwing an exception inside recover will be logged on ERROR level automatically.

emits when the element is available from the upstream or upstream is failed and pf returns an element

backpressures when downstream backpressures, not when failure happened

completes when upstream completes or upstream failed with exception pf can handle

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.