|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object abbot.util.EventDispatchExceptionHandler
public class EventDispatchExceptionHandler
Handler for uncaught exceptions on any event dispatch thread. Once this has been installed, the class must be accessible by any subsequently launched dispatch thread.
This handler is installed by setting the System property sun.awt.exception.handler. See javadoc for java.awt.EventDispatchThread for details. This is sort of a patch to Sun's implementation, which only checks the property once and caches the result ever after. This implementation will always chain to the handler indicated by the current value of the property.
It is most definitely NOT safe to try to install several of these on different threads.
Field Summary | |
---|---|
static String |
PROP_NAME
See javadoc for java.awt.EventDispatchThread. |
Constructor Summary | |
---|---|
EventDispatchExceptionHandler()
|
Method Summary | |
---|---|
protected void |
exceptionCaught(Throwable thrown)
Define this to handle the exception as needed. |
void |
handle(Throwable thrown)
Handle exceptions thrown on the event dispatch thread. |
void |
install()
Install a handler for event dispatch exceptions. |
static boolean |
isInstalled()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_NAME
Constructor Detail |
---|
public EventDispatchExceptionHandler()
Method Detail |
---|
public void install()
RuntimeException
- if the handler cannot be installed.
IllegalStateException
- if this method is invoked from an event
dispatch thread.
IllegalArgumentException
- if the given class is not derived
from this one.
// TODO: read the private static field
// String EventDispatchThread.handlerClassName and override it if
// necessary.protected void exceptionCaught(Throwable thrown)
public void handle(Throwable thrown)
public static boolean isInstalled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |