Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.x: SafeSubscriber not to call RxJavaHooks before delivering the original error. #4641

merged 1 commit into from Sep 30, 2016
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -19,7 +19,7 @@

import rx.Subscriber;
import rx.exceptions.*;
import rx.plugins.RxJavaHooks;
import rx.plugins.*;

* {@code SafeSubscriber} is a wrapper around {@code Subscriber} that ensures that the {@code Subscriber}
@@ -146,8 +146,9 @@ public void onNext(T args) {
* @see <a href="">the report of this bug</a>
protected void _onError(Throwable e) { // NOPMD
try {
} catch (OnErrorNotImplementedException e2) { // NOPMD
@@ -1084,4 +1084,25 @@ public Object call(Object t) {

public void noCallToHooksOnPlainError() {

final boolean[] called = { false };

RxJavaHooks.setOnError(new Action1<Throwable>() {
public void call(Throwable t) {
called[0] = true;

try {
Observable.error(new TestException())
.subscribe(new TestSubscriber<Object>());

} finally {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.