37 |
|
|
38 |
package java.lang; |
package java.lang; |
39 |
|
|
40 |
|
import java.lang.Thread.UncaughtExceptionHandler; |
41 |
import java.util.Vector; |
import java.util.Vector; |
42 |
|
|
43 |
/** |
/** |
54 |
* @since 1.0 |
* @since 1.0 |
55 |
* @status updated to 1.4 |
* @status updated to 1.4 |
56 |
*/ |
*/ |
57 |
public class ThreadGroup |
public class ThreadGroup implements UncaughtExceptionHandler |
58 |
{ |
{ |
59 |
/** The Initial, top-level ThreadGroup. */ |
/** The Initial, top-level ThreadGroup. */ |
60 |
static ThreadGroup root = new ThreadGroup(); |
static ThreadGroup root = new ThreadGroup(); |
546 |
{ |
{ |
547 |
if (parent != null) |
if (parent != null) |
548 |
parent.uncaughtException(thread, t); |
parent.uncaughtException(thread, t); |
549 |
|
else if (Thread.getDefaultUncaughtExceptionHandler() != null) |
550 |
|
Thread.getDefaultUncaughtExceptionHandler().uncaughtException(thread, t); |
551 |
else if (! (t instanceof ThreadDeath)) |
else if (! (t instanceof ThreadDeath)) |
552 |
{ |
{ |
553 |
if (t == null) |
if (t == null) |