You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rxjava-core/src/main/java/rx/Observable.java
+21-8Lines changed: 21 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -5277,7 +5277,8 @@ public final Observable<T> onErrorResumeNext(final Observable<? extends T> resum
5277
5277
* By default, when an Observable encounters an error that prevents it from emitting the expected item to
5278
5278
* its {@link Observer}, the Observable invokes its Observer's {@code onError} method, and then quits
5279
5279
* without invoking any more of its Observer's methods. The {@code onErrorReturn} method changes this
5280
-
* behavior. If you pass a function ({@code resumeFunction}) to an Observable's {@code onErrorReturn} method, if the original Observable encounters an error, instead of invoking its Observer's
5280
+
* behavior. If you pass a function ({@code resumeFunction}) to an Observable's {@code onErrorReturn}
5281
+
* method, if the original Observable encounters an error, instead of invoking its Observer's
5281
5282
* {@code onError} method, it will instead emit the return value of {@code resumeFunction}.
5282
5283
* <p>
5283
5284
* You can use this to prevent errors from propagating or to supply fallback data should errors be
@@ -5294,26 +5295,38 @@ public final Observable<T> onErrorReturn(Func1<Throwable, ? extends T> resumeFun
5294
5295
}
5295
5296
5296
5297
/**
5297
-
* Allows inserting onNext events into a stream when onError events are received
5298
-
* and continuing the original sequence instead of terminating. Thus it allows a sequence
5299
-
* with multiple onError events.
5298
+
* Allows inserting onNext events into a stream when onError events are received and continuing the original
5299
+
* sequence instead of terminating. Thus it allows a sequence with multiple onError events.
* Instruct an Observable to pass control to another Observable rather than invoking {@link Observer#onError onError} if it encounters an {@link java.lang.Exception}.
5315
+
* Instruct an Observable to pass control to another Observable rather than invoking
5316
+
* {@link Observer#onError onError} if it encounters an {@link java.lang.Exception}.
5307
5317
* <p>
5308
-
* This differs from {@link #onErrorResumeNext} in that this one does not handle {@link java.lang.Throwable} or {@link java.lang.Error} but lets those continue through.
5318
+
* This differs from {@link #onErrorResumeNext} in that this one does not handle {@link java.lang.Throwable}
5319
+
* or {@link java.lang.Error} but lets those continue through.
* By default, when an Observable encounters an exception that prevents it from emitting the expected item
5313
5324
* to its {@link Observer}, the Observable invokes its Observer's {@code onError} method, and then quits
5314
5325
* without invoking any more of its Observer's methods. The {@code onExceptionResumeNext} method changes
5315
-
* this behavior. If you pass another Observable ({@code resumeSequence}) to an Observable's {@code onExceptionResumeNext} method, if the original Observable encounters an exception, instead of
5316
-
* invoking its Observer's {@code onError} method, it will instead relinquish control to {@code resumeSequence} which will invoke the Observer's {@link Observer#onNext onNext} method if it is
5326
+
* this behavior. If you pass another Observable ({@code resumeSequence}) to an Observable's
5327
+
* {@code onExceptionResumeNext} method, if the original Observable encounters an exception, instead of
5328
+
* invoking its Observer's {@code onError} method, it will instead relinquish control to
5329
+
* {@code resumeSequence} which will invoke the Observer's {@link Observer#onNext onNext} method if it is
5317
5330
* able to do so. In such a case, because no Observable necessarily invokes {@code onError}, the Observer
0 commit comments