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
I get Fatal Exception: java.lang.RuntimeException java.lang.RuntimeException in SafeObserver in cases when both onError and onNext will through exception inside.
observable1
.subscribe(new Observer<Configs>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
throw new UnknownError("Ooooppsss");
}
@Override
public void onNext(Configs args) {
throw new UnknownError("Ooooppsss");
}
});
Stack trace:
java.lang.RuntimeException: Error occurred when trying to propagate error to Observer.onError
at rx.operators.SafeObserver.onError(SafeObserver.java:109)
at rx.operators.SafeObserver.onNext(SafeObserver.java:125)
at rx.Notification.accept(Notification.java:121)
at rx.operators.OperationObserveOn$ObserveOn$2.call(OperationObserveOn.java:121)
at rx.operators.OperationObserveOn$ObserveOn$2.call(OperationObserveOn.java:116)
at rx.Scheduler$3.call(Scheduler.java:163)
at rx.Scheduler$3.call(Scheduler.java:159)
at rx.android.concurrency.HandlerThreadScheduler$1.run(HandlerThreadScheduler.java:82)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: rx.util.CompositeException: UnknownError:Ooooppsss, UnknownError:Ooooppsss
at rx.operators.SafeObserver.onError(SafeObserver.java:109)
at rx.operators.SafeObserver.onNext(SafeObserver.java:125)
at rx.Notification.accept(Notification.java:121)
at rx.operators.OperationObserveOn$ObserveOn$2.call(OperationObserveOn.java:121)
at rx.operators.OperationObserveOn$ObserveOn$2.call(OperationObserveOn.java:116)
at rx.Scheduler$3.call(Scheduler.java:163)
at rx.Scheduler$3.call(Scheduler.java:159)
at rx.android.concurrency.HandlerThreadScheduler$1.run(HandlerThreadScheduler.java:82)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
The text was updated successfully, but these errors were encountered:
Issue is very typical for Android. Assume that we do some work with UI in onNext and onError. This work will fail with exception if activity was closed by the time async operation is completed. So we need to ensure that all exceptions in onError and onNext will be suppressed.
If you want to suppress everything then you need to make sure you don't throw from within onError or an onErrorResumeNext operator. You can swallow the errors if you want, but RxJava won't swallow them automatically.
I get Fatal Exception: java.lang.RuntimeException java.lang.RuntimeException in SafeObserver in cases when both onError and onNext will through exception inside.
Stack trace:
The text was updated successfully, but these errors were encountered: