diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index d20b0aafee..87bf672d96 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -2965,6 +2965,19 @@ public static Flowable mergeArray(int maxConcurrency, int bufferSize, Pub * backpressure; if violated, the operator may signal {@code MissingBackpressureException}. *
Scheduler:
*
{@code merge} does not operate by default on a particular {@link Scheduler}.
+ *
Error handling:
+ *
If any of the source {@code Publisher}s signal a {@code Throwable} via {@code onError}, the resulting + * {@code Flowable} terminates with that {@code Throwable} and all other source {@code Publisher}s are cancelled. + * If more than one {@code Publisher} signals an error, the resulting {@code Flowable} may terminate with the + * first one's error or, depending on the concurrency of the sources, may terminate with a + * {@code CompositeException} containing two or more of the various error signals. + * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via + * {@link RxJavaPlugins#onError(Throwable)} method as undeliverable errors. Similarly, {@code Throwable}s + * signaled by source(s) after the returned {@code Flowable} has been cancelled or terminated with a + * (composite) error will be sent to the same global error handler. + * Use {@link #mergeDelayError(Iterable)} to merge sources and terminate only when all source {@code Publisher}s + * have completed or failed with an error. + *
* * * @param the common element base type @@ -2973,6 +2986,7 @@ public static Flowable mergeArray(int maxConcurrency, int bufferSize, Pub * @return a Flowable that emits items that are the result of flattening the items emitted by the * Publishers in the Iterable * @see ReactiveX operators documentation: Merge + * @see #mergeDelayError(Iterable) */ @SuppressWarnings({ "unchecked", "rawtypes" }) @CheckReturnValue