Clear list after handling uncaught exceptions

See gh-4423
This commit is contained in:
Phillip Webb 2015-11-11 11:59:39 -08:00
parent c595d89717
commit 8c0decac94
1 changed files with 7 additions and 2 deletions

View File

@ -44,8 +44,13 @@ class LoggedExceptionHandler implements UncaughtExceptionHandler {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
if (!isRegistered(ex) && this.parent != null) {
this.parent.uncaughtException(thread, ex);
try {
if (!isRegistered(ex) && this.parent != null) {
this.parent.uncaughtException(thread, ex);
}
}
finally {
this.exceptions.clear();
}
}