Avoid swallowing errors in Completable#3733
Conversation
|
What happened to |
src/main/java/rx/Completable.java
Outdated
| ERROR_HANDLER.handleError(e); | ||
| mad.unsubscribe(); | ||
| Thread thread = Thread.currentThread(); | ||
| thread.getUncaughtExceptionHandler().uncaughtException(thread, e); |
There was a problem hiding this comment.
Let's just inline Thread.currentThread() call here and below?
There was a problem hiding this comment.
Or create a private method perhaps?
There was a problem hiding this comment.
private method is fair. done.
|
@akarnokd sorry, IJ formatted it. Will clean up and push again. |
7309342 to
d22ba1d
Compare
|
👍 |
| } | ||
|
|
||
|
|
||
| private static void deliverUncaughtException(Throwable e) { |
There was a problem hiding this comment.
Now it's a good candidate to live in Exceptions 😸
There was a problem hiding this comment.
That would require it to be public, sadly, and this isn't an API that RxJava needs to provide for users.
There was a problem hiding this comment.
Well, we can create ExceptionsInternal under internal package, but yeah… k, let's extract it if somewhere else same functionality will be needed.
|
just a nit about |
Instead, deliver them up to the thread's uncaught exception handler. Fixes ReactiveX#3726
d22ba1d to
8b55303
Compare
|
removed timeouts |
|
👍 |
Avoid swallowing errors in Completable
Instead, deliver them up to the thread's uncaught exception handler.
Fixes #3726