aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/Timer.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/util/Timer.java')
-rw-r--r--libjava/java/util/Timer.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/libjava/java/util/Timer.java b/libjava/java/util/Timer.java
index e4eb246a1db..364d5314a97 100644
--- a/libjava/java/util/Timer.java
+++ b/libjava/java/util/Timer.java
@@ -343,9 +343,16 @@ public class Timer
{
task.run();
}
+ catch (ThreadDeath death)
+ {
+ // If an exception escapes, the Timer becomes invalid.
+ queue.stop();
+ throw death;
+ }
catch (Throwable t)
- {
- /* ignore all errors */
+ {
+ // If an exception escapes, the Timer becomes invalid.
+ queue.stop();
}
}