@@ -451,10 +451,23 @@ public static <T> Completable fromSingle(final SingleSource<T> single) {
451
451
* <dl>
452
452
* <dt><b>Scheduler:</b></dt>
453
453
* <dd>{@code mergeArray} does not operate by default on a particular {@link Scheduler}.</dd>
454
+ * <dd>If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
455
+ * {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are cancelled.
456
+ * If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
457
+ * first one's error or, depending on the concurrency of the sources, may terminate with a
458
+ * {@code CompositeException} containing two or more of the various error signals.
459
+ * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
460
+ * {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
461
+ * signaled by source(s) after the returned {@code Completable} has been cancelled or terminated with a
462
+ * (composite) error will be sent to the same global error handler.
463
+ * Use {@link #mergeArrayDelayError(CompletableSource...)} to merge sources and terminate only when all source {@code CompletableSource}s
464
+ * have completed or failed with an error.
465
+ * </dd>
454
466
* </dl>
455
467
* @param sources the iterable sequence of sources.
456
468
* @return the new Completable instance
457
469
* @throws NullPointerException if sources is null
470
+ * @see #mergeArrayDelayError(CompletableSource...)
458
471
*/
459
472
@ CheckReturnValue
460
473
@ SchedulerSupport (SchedulerSupport .NONE )
@@ -475,10 +488,24 @@ public static Completable mergeArray(CompletableSource... sources) {
475
488
* <dl>
476
489
* <dt><b>Scheduler:</b></dt>
477
490
* <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
491
+ * <dt><b>Error handling:</b></dt>
492
+ * <dd>If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
493
+ * {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are cancelled.
494
+ * If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
495
+ * first one's error or, depending on the concurrency of the sources, may terminate with a
496
+ * {@code CompositeException} containing two or more of the various error signals.
497
+ * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
498
+ * {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
499
+ * signaled by source(s) after the returned {@code Completable} has been cancelled or terminated with a
500
+ * (composite) error will be sent to the same global error handler.
501
+ * Use {@link #mergeDelayError(Iterable)} to merge sources and terminate only when all source {@code CompletableSource}s
502
+ * have completed or failed with an error.
503
+ * </dd>
478
504
* </dl>
479
505
* @param sources the iterable sequence of sources.
480
506
* @return the new Completable instance
481
507
* @throws NullPointerException if sources is null
508
+ * @see #mergeDelayError(Iterable)
482
509
*/
483
510
@ CheckReturnValue
484
511
@ SchedulerSupport (SchedulerSupport .NONE )
@@ -496,10 +523,23 @@ public static Completable merge(Iterable<? extends CompletableSource> sources) {
496
523
* and expects the other {@code Publisher} to honor it as well.</dd>
497
524
* <dt><b>Scheduler:</b></dt>
498
525
* <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
526
+ * <dd>If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
527
+ * {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are cancelled.
528
+ * If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
529
+ * first one's error or, depending on the concurrency of the sources, may terminate with a
530
+ * {@code CompositeException} containing two or more of the various error signals.
531
+ * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
532
+ * {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
533
+ * signaled by source(s) after the returned {@code Completable} has been cancelled or terminated with a
534
+ * (composite) error will be sent to the same global error handler.
535
+ * Use {@link #mergeDelayError(Publisher)} to merge sources and terminate only when all source {@code CompletableSource}s
536
+ * have completed or failed with an error.
537
+ * </dd>
499
538
* </dl>
500
539
* @param sources the iterable sequence of sources.
501
540
* @return the new Completable instance
502
541
* @throws NullPointerException if sources is null
542
+ * @see #mergeDelayError(Publisher)
503
543
*/
504
544
@ CheckReturnValue
505
545
@ SchedulerSupport (SchedulerSupport .NONE )
@@ -517,12 +557,25 @@ public static Completable merge(Publisher<? extends CompletableSource> sources)
517
557
* and expects the other {@code Publisher} to honor it as well.</dd>
518
558
* <dt><b>Scheduler:</b></dt>
519
559
* <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
560
+ * <dd>If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
561
+ * {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are cancelled.
562
+ * If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
563
+ * first one's error or, depending on the concurrency of the sources, may terminate with a
564
+ * {@code CompositeException} containing two or more of the various error signals.
565
+ * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
566
+ * {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
567
+ * signaled by source(s) after the returned {@code Completable} has been cancelled or terminated with a
568
+ * (composite) error will be sent to the same global error handler.
569
+ * Use {@link #mergeDelayError(Publisher, int)} to merge sources and terminate only when all source {@code CompletableSource}s
570
+ * have completed or failed with an error.
571
+ * </dd>
520
572
* </dl>
521
573
* @param sources the iterable sequence of sources.
522
574
* @param maxConcurrency the maximum number of concurrent subscriptions
523
575
* @return the new Completable instance
524
576
* @throws NullPointerException if sources is null
525
577
* @throws IllegalArgumentException if maxConcurrency is less than 1
578
+ * @see #mergeDelayError(Publisher, int)
526
579
*/
527
580
@ CheckReturnValue
528
581
@ SchedulerSupport (SchedulerSupport .NONE )
@@ -1253,7 +1306,7 @@ public final Completable doOnSubscribe(Consumer<? super Disposable> onSubscribe)
1253
1306
1254
1307
/**
1255
1308
* Returns a Completable instance that calls the given onTerminate callback just before this Completable
1256
- * completes normally or with an exception
1309
+ * completes normally or with an exception.
1257
1310
* <dl>
1258
1311
* <dt><b>Scheduler:</b></dt>
1259
1312
* <dd>{@code doOnTerminate} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -1272,7 +1325,7 @@ public final Completable doOnTerminate(final Action onTerminate) {
1272
1325
1273
1326
/**
1274
1327
* Returns a Completable instance that calls the given onTerminate callback after this Completable
1275
- * completes normally or with an exception
1328
+ * completes normally or with an exception.
1276
1329
* <dl>
1277
1330
* <dt><b>Scheduler:</b></dt>
1278
1331
* <dd>{@code doAfterTerminate} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -2084,7 +2137,7 @@ public final <T> Single<T> toSingleDefault(final T completionValue) {
2084
2137
2085
2138
/**
2086
2139
* Returns a Completable which makes sure when a subscriber cancels the subscription, the
2087
- * dispose is called on the specified scheduler
2140
+ * dispose is called on the specified scheduler.
2088
2141
* <dl>
2089
2142
* <dt><b>Scheduler:</b></dt>
2090
2143
* <dd>{@code unsubscribeOn} calls dispose() of the upstream on the {@link Scheduler} you specify.</dd>
0 commit comments