01: package abbot.script;
02:
03: import abbot.*;
04: import abbot.util.EventDispatchExceptionHandler;
05:
06: public class EventExceptionHandler extends
07: EventDispatchExceptionHandler {
08: protected void exceptionCaught(Throwable thr) {
09: if (thr.getClass().getName().equals(
10: ExitException.class.getName())) {
11: Log.debug("Application attempted exit from the event "
12: + "dispatch thread, ignoring it");
13: Log.debug(thr);
14: } else if (thr instanceof NullPointerException
15: && Log.getStack(Log.FULL_STACK, thr).indexOf(
16: "createHierarchyEvents") != -1) {
17: // java 1.3 hierarchy listener bug, most likely
18: Log.debug("Apparent hierarchy NPE bug:\n"
19: + Log.getStack(Log.FULL_STACK, thr));
20: } else {
21: Log.warn("Unexpected exception while dispatching events:");
22: Log.warn(thr);
23: }
24: }
25: }
|