-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onError not called for StackOverflowError? #6068
Comments
|
Thanks for the response. I've read some of the threads on the topic, it makes sense. Perhaps that should be documented somewhere though. And, still, I'm not sure how to handle my question number 3 - in "normal synchronous" Java I can do: try {
lockLocks();
} catch (Throwable t) {
unlockLocks();
throw t;
} Which is "safe" in both senses - I unlock the locks and then I rethrow the lethal exception. How can I do the same in Rx? P.S. Right now I do: Action doFinally = () -> { unlockLocks() };
maybe.doOnDispose(doFinally).doOnEvent((_unused1, _unused2) -> doFinally.run()) But this doesn't work for StackOverflow... |
Don't use locks and RxJava together. |
Not exactly the answer I was looking for but thanks nevertheless! :) |
I'm not exactly sure on the semantics of onError (any of those - Single, Observable, etc) - it has a
Throwable
as an argument however I don't see it being called forStackOverflowError
for example. Am I doing something wrong or is this by design? If this is by design, a few things:onError
passed aThrowable
and notException
?Thanks!
The text was updated successfully, but these errors were encountered: