JAPI pointed out that InvocationEvent.getThrowable was missing. I wrote it, which involved a slight tweak of dispatch() as well.
2005-11-07 Anthony Balkissoon <[EMAIL PROTECTED]> * java/awt/event/InvocationEvent.java: (throwable): New field. (getThrowable): New API method. (dispatch()): Catch Throwable, not Exception. Save the Throwable. If it is an Exception, save the Exception. --Tony
Index: java/awt/event/InvocationEvent.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/event/InvocationEvent.java,v retrieving revision 1.9 diff -u -r1.9 InvocationEvent.java --- java/awt/event/InvocationEvent.java 2 Jul 2005 20:32:28 -0000 1.9 +++ java/awt/event/InvocationEvent.java 7 Nov 2005 18:23:55 -0000 @@ -107,6 +107,11 @@ private Exception exception; /** + * This is the caught Throwable thrown in the <code>run()</code> method. + */ + private Throwable throwable; + + /** * The timestamp when this event was created. * * @see #getWhen() @@ -183,9 +188,11 @@ { runnable.run(); } - catch (Exception e) + catch (Throwable t) { - exception = e; + throwable = t; + if (t instanceof Exception) + exception = (Exception)t; } else runnable.run(); @@ -210,6 +217,17 @@ return exception; } + /** + * Returns a throwable caught while executing the Runnable's run() method. + * Null if none was thrown or if this InvocationEvent doesn't catch + * throwables. + * @return the caught Throwable + */ + public Throwable getThrowable() + { + return throwable; + } + /** * Gets the timestamp of when this event was created. *
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches