-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3733 from loganj/completable-errors
Avoid swallowing errors in Completable
- Loading branch information
Showing
4 changed files
with
109 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package rx; | ||
|
||
import java.util.concurrent.CountDownLatch; | ||
|
||
public final class CapturingUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { | ||
public int count = 0; | ||
public Throwable caught; | ||
public CountDownLatch completed = new CountDownLatch(1); | ||
|
||
@Override | ||
public void uncaughtException(Thread t, Throwable e) { | ||
count++; | ||
caught = e; | ||
completed.countDown(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters