OnErrorExtensions<T> extension

Extends the Stream class with the ability to recover from errors in various ways

on

Methods

onErrorResume(Stream<T> recoveryFn(dynamic error)) Stream<T>
Intercepts error events and switches to a recovery stream created by the provided recoveryFn. [...]
onErrorResumeNext(Stream<T> recoveryStream) Stream<T>
Intercepts error events and switches to the given recovery stream in that case [...]
onErrorReturn(T returnValue) Stream<T>
instructs a Stream to emit a particular item when it encounters an error, and then terminate normally [...]
onErrorReturnWith(T returnFn(dynamic error)) Stream<T>
instructs a Stream to emit a particular item created by the returnFn when it encounters an error, and then terminate normally. [...]