diff options
Diffstat (limited to 'libjava/classpath/java/lang/ThreadGroup.java')
-rw-r--r-- | libjava/classpath/java/lang/ThreadGroup.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/classpath/java/lang/ThreadGroup.java b/libjava/classpath/java/lang/ThreadGroup.java index 6e4c27a7135..7fbef88f4d6 100644 --- a/libjava/classpath/java/lang/ThreadGroup.java +++ b/libjava/classpath/java/lang/ThreadGroup.java @@ -37,6 +37,7 @@ exception statement from your version. */ package java.lang; +import java.lang.Thread.UncaughtExceptionHandler; import java.util.Vector; /** @@ -53,7 +54,7 @@ import java.util.Vector; * @since 1.0 * @status updated to 1.4 */ -public class ThreadGroup +public class ThreadGroup implements UncaughtExceptionHandler { /** The Initial, top-level ThreadGroup. */ static ThreadGroup root = new ThreadGroup(); @@ -545,6 +546,8 @@ public class ThreadGroup { if (parent != null) parent.uncaughtException(thread, t); + else if (Thread.getDefaultUncaughtExceptionHandler() != null) + Thread.getDefaultUncaughtExceptionHandler().uncaughtException(thread, t); else if (! (t instanceof ThreadDeath)) { if (t == null) |