src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> doOnError(Consumer<? super Throwable> onError) {
        return doOnEach(Functions.emptyConsumer(), onError, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION);
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> doOnError(Consumer<? super Throwable> onError) {
        return doOnEach(Functions.emptyConsumer(), onError, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION);
    }
Modifies the source ObservableSource so that it invokes an action if it calls {@code onError}.
<p>
In case the {@code onError} action throws, the downstream will receive a composite exception containing
the original exception and the exception thrown by {@code onError}.
<p>
<img width="640" height="355" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doOnError.o.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code doOnError} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param onError
the action to invoke if the source ObservableSource calls {@code onError}
@return the source ObservableSource with the side-effecting behavior applied
@see <a href="http://reactivex.io/documentation/operators/do.html">ReactiveX operators documentation: Do</a>