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
If onError() is called and you don't have an onError() defined, OnErrorNotImplementedException should get thrown and crash your program. However, there's one case in Android where this doesn't seem to happen, and I'm having a hard time figuring out why that's the case.
Here's some short example code which should cause an app to crash, but doesn't:
I've been trying to figure out why this exception gets consumed; normally if the Subscriber throws an Exception but has no error handling it will crash the app. But in this case, CalledFromWrongThreadException gets thrown and ignored. This leads to a lot of sadness because it can cause all sorts of weird interactions (since normally this is a fatal, unrecoverable issue on Android).
It may ultimately be an RxJava based problem, but I can't reproduce it outside of the context of CalledFromWrongThreadException. Any ideas on what's going on?
The text was updated successfully, but these errors were encountered:
We had similar problems. We use precondition checks in places that raise IllegalArgumentException, and we want these to crash the app at dev time to fail early.
This has been proven difficult, since these checks can fail on background threads. We put terrible hacks in place to still fail early on these kinds of errors.
If
onError()
is called and you don't have anonError()
defined,OnErrorNotImplementedException
should get thrown and crash your program. However, there's one case in Android where this doesn't seem to happen, and I'm having a hard time figuring out why that's the case.Here's some short example code which should cause an app to crash, but doesn't:
I've been trying to figure out why this exception gets consumed; normally if the
Subscriber
throws anException
but has no error handling it will crash the app. But in this case,CalledFromWrongThreadException
gets thrown and ignored. This leads to a lot of sadness because it can cause all sorts of weird interactions (since normally this is a fatal, unrecoverable issue on Android).It may ultimately be an RxJava based problem, but I can't reproduce it outside of the context of
CalledFromWrongThreadException
. Any ideas on what's going on?The text was updated successfully, but these errors were encountered: