diff options
author | Mark Wielaard <mark@klomp.org> | 2006-04-12 12:04:16 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2006-04-12 12:04:16 +0000 |
commit | b90cc775e4018e9eb6f9c9edafcdb91b33272f04 (patch) | |
tree | 6869727a18dbd5e0ad45ba0284a7929469dd9914 /vm | |
parent | df77b05f70aec916b512d178b2d611ed9a492656 (diff) | |
download | classpath-b90cc775e4018e9eb6f9c9edafcdb91b33272f04.tar.gz |
2006-04-12 Mark Wielaard <mark@klomp.org>
Port UncaughtExceptionHandler support from generics branch.
* NEWS: Document Thread.UncaughtExceptionHandler VMThread change.
2006-04-12 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/lang/Thread.java:
(setUncaughtExceptionHandler(UncaughtExceptionHandler):
Added docs and security check.
(getUncaughtExceptionHandler()): Documented.
(setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler):
Added docs and security check.
(getDefaultUncaughtExceptionHandler()): Documented.
(getId()): Documented.
2006-04-12 Tom Tromey <tromey@redhat.com>
* vm/reference/java/lang/VMThread.java (run): Use thread's
uncaught handler.
* java/lang/Thread.java (defaultHandler): New field.
(setDefaultUncaughtExceptionHandler,
getDefaultUncaughtExceptionHandler, setUncaughtExceptionHandler,
getUncaughtExceptionHandler): New methods.
* java/lang/ThreadGroup.java (ThreadGroup): Implements
UncaughtExceptionHandler.
(uncaughtException): Use getDefaultUncaughtExceptionHandler.
Diffstat (limited to 'vm')
-rw-r--r-- | vm/reference/java/lang/VMThread.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vm/reference/java/lang/VMThread.java b/vm/reference/java/lang/VMThread.java index aa0b8347a..b864b7f81 100644 --- a/vm/reference/java/lang/VMThread.java +++ b/vm/reference/java/lang/VMThread.java @@ -123,7 +123,10 @@ final class VMThread { try { - thread.group.uncaughtException(thread, t); + Thread.UncaughtExceptionHandler handler = thread.getUncaughtExceptionHandler(); + if (handler == null) + handler = thread.group; + handler.uncaughtException(thread, t); } catch(Throwable ignore) { |