OnErrorResumeSingleExtensions<T> extension
Extends the Single class with the ability to recover from errors in various ways.
- on
-
- Single<
T>
- Single<
Methods
-
onErrorResumeNextSingle(
Single< T> recoverySingle) → Single<T> - Intercepts error events and switches to the given recovery Single in that case.
-
onErrorResumeSingle(
Single< T> fallbackSupplier(Object error, StackTrace stackTrace)) → Single<T> -
Intercepts error events and switches to a recovery Single created by the
provided
fallbackSupplier
. -
onErrorReturn(
T returnValue) → Single< T> - Instructs a Single to emit a particular item when it encounters an error, and then terminate normally.
-
onErrorReturnWith(
T itemSupplier(Object error, StackTrace stackTrace)) → Single< T> -
Instructs a Single to emit a particular item created by the
itemSupplier
when it encounters an error, and then terminate normally.