Created
April 17, 2018 15:01
-
-
Save vvsevolodovich/98f592357e0fc39a2d4d88222ee2bf00 to your computer and use it in GitHub Desktop.
SingleSubscribe
This file contains hidden or 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
@SchedulerSupport(SchedulerSupport.NONE) | |
@Override | |
public final void subscribe(SingleObserver<? super T> subscriber) { | |
ObjectHelper.requireNonNull(subscriber, "subscriber is null"); | |
subscriber = RxJavaPlugins.onSubscribe(this, subscriber); | |
ObjectHelper.requireNonNull(subscriber, "subscriber returned by the RxJavaPlugins hook is null"); | |
try { | |
subscribeActual(subscriber); | |
} catch (NullPointerException ex) { | |
throw ex; | |
} catch (Throwable ex) { | |
Exceptions.throwIfFatal(ex); | |
NullPointerException npe = new NullPointerException("subscribeActual failed"); | |
npe.initCause(ex); | |
throw npe; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment