Skip to content

Commit

Permalink
2.x: Describe merge() error handling. (ReactiveX#5781)
Browse files Browse the repository at this point in the history
  • Loading branch information
akarnokd authored Jan 3, 2018
1 parent 8b11ea8 commit a694145
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/io/reactivex/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -2965,6 +2965,19 @@ public static <T> Flowable<T> mergeArray(int maxConcurrency, int bufferSize, Pub
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
* <dt><b>Error handling:</b></dt>
* <dd>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 <em>undeliverable errors</em>. 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.
* </dd>
* </dl>
*
* @param <T> the common element base type
Expand All @@ -2973,6 +2986,7 @@ public static <T> Flowable<T> 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 <a href="http://reactivex.io/documentation/operators/merge.html">ReactiveX operators documentation: Merge</a>
* @see #mergeDelayError(Iterable)
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@CheckReturnValue
Expand Down

0 comments on commit a694145

Please sign in to comment.