Last active
February 1, 2022 16:29
-
-
Save kaushikgopal/90135e035147870e037b723e6e94c6e2 to your computer and use it in GitHub Desktop.
RxJava log exception only subscriber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class LogExOnlySubscriber<T> extends Subscriber<T> { | |
@Override | |
public void onCompleted() { | |
} | |
@Override | |
public void onError(Throwable ex) { | |
Timber.e(ex, "Your RX IZ FAILING YO!"); | |
} | |
@Override | |
public void onNext(T t) { | |
} | |
} | |
// Usage: | |
// Observable.just(something) | |
// .. | |
// .subscribe(new LogExOnlySubscriber(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment