src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public static <T> Observable<T> error(Callable<? extends Throwable> errorSupplier) {
        ObjectHelper.requireNonNull(errorSupplier, "errorSupplier is null");
        return RxJavaPlugins.onAssembly(new ObservableError<T>(errorSupplier));
    }
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public static <T> Observable<T> error(Callable<? extends Throwable> errorSupplier) {
        ObjectHelper.requireNonNull(errorSupplier, "errorSupplier is null");
        return RxJavaPlugins.onAssembly(new ObservableError<T>(errorSupplier));
    }
@ CheckReturnValue @ NonNull @ SchedulerSupport ( SchedulerSupport . NONE ) public static < T > Observable < T > error ( Callable < ? extends Throwable > errorSupplier ) { ObjectHelper . requireNonNull ( errorSupplier , "errorSupplier is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableError < T > ( errorSupplier ) ) ; }
Returns an Observable that invokes an {@link Observer}'s {@link Observer#onError onError} method when the
Observer subscribes to it.
<p>
<img width="640" height="220" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/error.supplier.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code error} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param errorSupplier
a Callable factory to return a Throwable for each individual Observer
@param <T>
the type of the items (ostensibly) emitted by the ObservableSource
@return an Observable that invokes the {@link Observer}'s {@link Observer#onError onError} method when
the Observer subscribes to it
@see <a href="http://reactivex.io/documentation/operators/empty-never-throw.html">ReactiveX operators documentation: Throw</a>
Returns an Observable that invokes an { @link Observer } s { @link Observer#onError onError } method when the Observer subscribes to it . <p > <img width = 640 height = 220 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / error . supplier . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code error } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >