diff --git a/src/main/java/io/reactivex/Completable.java b/src/main/java/io/reactivex/Completable.java index 6cf5aa75f4..430440b248 100644 --- a/src/main/java/io/reactivex/Completable.java +++ b/src/main/java/io/reactivex/Completable.java @@ -396,6 +396,13 @@ public static Completable error(final Throwable error) { *
*
Scheduler:
*
{@code fromAction} does not operate by default on a particular {@link Scheduler}.
+ *
Error handling:
+ *
If the {@link Action} throws an exception, the respective {@link Throwable} is + * delivered to the downstream via {@link CompletableObserver#onError(Throwable)}, + * except when the downstream has disposed this {@code Completable} source. + * In this latter case, the {@code Throwable} is delivered to the global error handler via + * {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.exceptions.UndeliverableException UndeliverableException}. + *
*
* @param run the runnable to run for each subscriber * @return the new Completable instance @@ -416,6 +423,13 @@ public static Completable fromAction(final Action run) { *
*
Scheduler:
*
{@code fromCallable} does not operate by default on a particular {@link Scheduler}.
+ *
Error handling:
+ *
If the {@link Callable} throws an exception, the respective {@link Throwable} is + * delivered to the downstream via {@link CompletableObserver#onError(Throwable)}, + * except when the downstream has disposed this {@code Completable} source. + * In this latter case, the {@code Throwable} is delivered to the global error handler via + * {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.exceptions.UndeliverableException UndeliverableException}. + *
*
* @param callable the callable instance to execute for each subscriber * @return the new Completable instance diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index bab8443357..549166dfac 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -1955,6 +1955,13 @@ public static Flowable fromArray(T... items) { *
The operator honors backpressure from downstream.
*
Scheduler:
*
{@code fromCallable} does not operate by default on a particular {@link Scheduler}.
+ *
Error handling:
+ *
If the {@link Callable} throws an exception, the respective {@link Throwable} is + * delivered to the downstream via {@link Subscriber#onError(Throwable)}, + * except when the downstream has canceled this {@code Flowable} source. + * In this latter case, the {@code Throwable} is delivered to the global error handler via + * {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.exceptions.UndeliverableException UndeliverableException}. + *
* * * @param supplier diff --git a/src/main/java/io/reactivex/Maybe.java b/src/main/java/io/reactivex/Maybe.java index 8750c83cd2..be9c888762 100644 --- a/src/main/java/io/reactivex/Maybe.java +++ b/src/main/java/io/reactivex/Maybe.java @@ -657,6 +657,13 @@ public static Maybe error(Callable supplier) { *
*
Scheduler:
*
{@code fromAction} does not operate by default on a particular {@link Scheduler}.
+ *
Error handling:
+ *
If the {@link Action} throws an exception, the respective {@link Throwable} is + * delivered to the downstream via {@link MaybeObserver#onError(Throwable)}, + * except when the downstream has disposed this {@code Maybe} source. + * In this latter case, the {@code Throwable} is delivered to the global error handler via + * {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.exceptions.UndeliverableException UndeliverableException}. + *
*
* @param the target type * @param run the runnable to run for each subscriber diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index d1adc46efa..541c15215c 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -1757,8 +1757,14 @@ public static Observable fromArray(T... items) { *
*
Scheduler:
*
{@code fromCallable} does not operate by default on a particular {@link Scheduler}.
+ *
Error handling:
+ *
If the {@link Callable} throws an exception, the respective {@link Throwable} is + * delivered to the downstream via {@link Observer#onError(Throwable)}, + * except when the downstream has disposed this {@code Observable} source. + * In this latter case, the {@code Throwable} is delivered to the global error handler via + * {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.exceptions.UndeliverableException UndeliverableException}. + *
*
- * * @param supplier * a function, the execution of which should be deferred; {@code fromCallable} will invoke this * function only when an observer subscribes to the ObservableSource that {@code fromCallable} returns diff --git a/src/main/java/io/reactivex/Single.java b/src/main/java/io/reactivex/Single.java index 51a896c887..dca4eb9ed0 100644 --- a/src/main/java/io/reactivex/Single.java +++ b/src/main/java/io/reactivex/Single.java @@ -583,6 +583,13 @@ public static Single error(final Throwable exception) { *
*
Scheduler:
*
{@code fromCallable} does not operate by default on a particular {@link Scheduler}.
+ *
Error handling:
+ *
If the {@link Callable} throws an exception, the respective {@link Throwable} is + * delivered to the downstream via {@link SingleObserver#onError(Throwable)}, + * except when the downstream has disposed this {@code Single} source. + * In this latter case, the {@code Throwable} is delivered to the global error handler via + * {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.exceptions.UndeliverableException UndeliverableException}. + *
*
* * @param callable