diff --git a/src/main/java/io/reactivex/rxjava3/core/Completable.java b/src/main/java/io/reactivex/rxjava3/core/Completable.java index 0913ac398d..4a5bd55c39 100644 --- a/src/main/java/io/reactivex/rxjava3/core/Completable.java +++ b/src/main/java/io/reactivex/rxjava3/core/Completable.java @@ -2086,6 +2086,33 @@ public final Completable onErrorResumeNext(@NonNull Function super Throwable, Objects.requireNonNull(fallbackSupplier, "fallbackSupplier is null"); return RxJavaPlugins.onAssembly(new CompletableResumeNext(this, fallbackSupplier)); } + /** + * Resumes the flow with the given {@link CompletableSource} when the current {@code Completable} fails instead of + * signaling the error via {@code onError}. + *
+ *
+ *
+ * You can use this to prevent errors from propagating or to supply fallback data should errors be + * encountered. + *
- *
+ *
*
* You can use this to prevent errors from propagating or to supply fallback data should errors be
* encountered.
@@ -4112,7 +4112,7 @@ public final Maybe
- *
* You can use this to prevent errors from propagating or to supply fallback data should errors be
* encountered.
diff --git a/src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableResumeNextTest.java b/src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableResumeNextTest.java
index 5670264378..fb5390cdcc 100644
--- a/src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableResumeNextTest.java
+++ b/src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableResumeNextTest.java
@@ -13,18 +13,19 @@
package io.reactivex.rxjava3.internal.operators.completable;
+import static org.mockito.Mockito.*;
import org.junit.Test;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.TestException;
-import io.reactivex.rxjava3.functions.Function;
+import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.functions.Functions;
import io.reactivex.rxjava3.testsupport.TestHelper;
public class CompletableResumeNextTest extends RxJavaTest {
@Test
- public void resumeWithError() {
+ public void resumeNextError() {
Completable.error(new TestException())
.onErrorResumeNext(Functions.justFunction(Completable.error(new TestException("second"))))
.to(TestHelper.
+ *
*