src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> onErrorResumeNext(Function<? super Throwable, ? extends ObservableSource<? extends T>> resumeFunction) {
        ObjectHelper.requireNonNull(resumeFunction, "resumeFunction is null");
        return RxJavaPlugins.onAssembly(new ObservableOnErrorNext<T>(this, resumeFunction, false));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> onErrorResumeNext(Function<? super Throwable, ? extends ObservableSource<? extends T>> resumeFunction) {
        ObjectHelper.requireNonNull(resumeFunction, "resumeFunction is null");
        return RxJavaPlugins.onAssembly(new ObservableOnErrorNext<T>(this, resumeFunction, false));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > onErrorResumeNext ( Function < ? super Throwable , ? extends ObservableSource < ? extends T > > resumeFunction ) { ObjectHelper . requireNonNull ( resumeFunction , "resumeFunction is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableOnErrorNext < T > ( this , resumeFunction , false ) ) ; }
Instructs an ObservableSource to pass control to another ObservableSource rather than invoking
{@link Observer#onError onError} if it encounters an error.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/onErrorResumeNext.png" alt="">
<p>
By default, when an ObservableSource encounters an error that prevents it from emitting the expected item to
its {@link Observer}, the ObservableSource invokes its Observer's {@code onError} method, and then quits
without invoking any more of its Observer's methods. The {@code onErrorResumeNext} method changes this
behavior. If you pass a function that returns an ObservableSource ({@code resumeFunction}) to
{@code onErrorResumeNext}, if the original ObservableSource encounters an error, instead of invoking its
Observer's {@code onError} method, it will instead relinquish control to the ObservableSource returned from
{@code resumeFunction}, which will invoke the Observer's {@link Observer#onNext onNext} method if it is
able to do so. In such a case, because no ObservableSource necessarily invokes {@code onError}, the Observer
may never know that an error happened.
<p>
You can use this to prevent errors from propagating or to supply fallback data should errors be
encountered.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code onErrorResumeNext} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param resumeFunction
a function that returns an ObservableSource that will take over if the source ObservableSource encounters
an error
@return the original ObservableSource, with appropriately modified behavior
@see <a href="http://reactivex.io/documentation/operators/catch.html">ReactiveX operators documentation: Catch</a>
Instructs an ObservableSource to pass control to another ObservableSource rather than invoking { @link Observer#onError onError } if it encounters an error . <p > <img width = 640 height = 310 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / onErrorResumeNext . png alt = > <p > By default when an ObservableSource encounters an error that prevents it from emitting the expected item to its { @link Observer } the ObservableSource invokes its Observer s { @code onError } method and then quits without invoking any more of its Observer s methods . The { @code onErrorResumeNext } method changes this behavior . If you pass a function that returns an ObservableSource ( { @code resumeFunction } ) to { @code onErrorResumeNext } if the original ObservableSource encounters an error instead of invoking its Observer s { @code onError } method it will instead relinquish control to the ObservableSource returned from { @code resumeFunction } which will invoke the Observer s { @link Observer#onNext onNext } method if it is able to do so . In such a case because no ObservableSource necessarily invokes { @code onError } the Observer may never know that an error happened . <p > You can use this to prevent errors from propagating or to supply fallback data should errors be encountered . <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code onErrorResumeNext } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >