OnErrorExtensions<T> extension
Extends the Stream class with the ability to recover from errors in various ways
- on
-
- Stream<
T>
- Stream<
Methods
-
onErrorResume(
Stream< T> recoveryFn(Object error, StackTrace stackTrace)) → Stream<T> -
Available on Stream<
Intercepts error events and switches to a recovery stream created by the providedT> , provided by the OnErrorExtensions extensionrecoveryFn
. -
onErrorResumeNext(
Stream< T> recoveryStream) → Stream<T> -
Available on Stream<
Intercepts error events and switches to the given recovery stream in that caseT> , provided by the OnErrorExtensions extension -
onErrorReturn(
T returnValue) → Stream< T> -
Available on Stream<
Instructs a Stream to emit a particular item when it encounters an error, and then terminate normallyT> , provided by the OnErrorExtensions extension -
onErrorReturnWith(
T returnFn(Object error, StackTrace stackTrace)) → Stream< T> -
Available on Stream<
Instructs a Stream to emit a particular item created by theT> , provided by the OnErrorExtensions extensionreturnFn
when it encounters an error, and then terminate normally.