MCPcopy Index your code
hub / github.com/ReactiveX/RxJava / safeSubscribe

Method safeSubscribe

src/main/java/io/reactivex/rxjava3/core/Maybe.java:5089–5093  ·  view source on GitHub ↗

Wraps the given MaybeObserver, catches any RuntimeExceptions thrown by its MaybeObserver#onSubscribe(Disposable), MaybeObserver#onSuccess(Object), MaybeObserver#onError(Throwable) or MaybeObserver#onComplete() methods and routes those to the global err

(@NonNull MaybeObserver<? super T> observer)

Source from the content-addressed store, hash-verified

5087 * @since 3.0.0
5088 */
5089 @SchedulerSupport(SchedulerSupport.NONE)
5090 public final void safeSubscribe(@NonNull MaybeObserver<? super T> observer) {
5091 Objects.requireNonNull(observer, "observer is null");
5092 subscribe(new SafeMaybeObserver<>(observer));
5093 }
5094
5095 /**
5096 * Returns a {@link Flowable} which first runs the other {@link CompletableSource}

Callers 15

onNextErrorMethod · 0.45
normalSuccessMethod · 0.45
normalErrorMethod · 0.45
normalEmptyMethod · 0.45
onSubscribeCrashMethod · 0.45
onSuccessCrashMethod · 0.45
onErrorCrashMethod · 0.45

Calls 1

subscribeMethod · 0.95

Tested by 15

onNextErrorMethod · 0.36
normalSuccessMethod · 0.36
normalErrorMethod · 0.36
normalEmptyMethod · 0.36
onSubscribeCrashMethod · 0.36
onSuccessCrashMethod · 0.36
onErrorCrashMethod · 0.36