OnErrorExtensions<T> extension

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

on

Methods

onErrorResume(Stream<T> recoveryFn(Object error, StackTrace stackTrace)) Stream<T>

Available on Stream<T>, provided by the OnErrorExtensions extension

Intercepts error events and switches to a recovery stream created by the provided recoveryFn.
onErrorResumeNext(Stream<T> recoveryStream) Stream<T>

Available on Stream<T>, provided by the OnErrorExtensions extension

Intercepts error events and switches to the given recovery stream in that case
onErrorReturn(T returnValue) Stream<T>

Available on Stream<T>, provided by the OnErrorExtensions extension

Instructs a Stream to emit a particular item when it encounters an error, and then terminate normally
onErrorReturnWith(T returnFn(Object error, StackTrace stackTrace)) Stream<T>

Available on Stream<T>, provided by the OnErrorExtensions extension

Instructs a Stream to emit a particular item created by the returnFn when it encounters an error, and then terminate normally.