Index: java/awt/event/InvocationEvent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/event/InvocationEvent.java,v
retrieving revision 1.11
diff -u -r1.11 InvocationEvent.java
--- java/awt/event/InvocationEvent.java 8 Nov 2005 20:51:39 -0000 1.11
+++ java/awt/event/InvocationEvent.java 9 Nov 2005 19:21:58 -0000
@@ -98,6 +98,15 @@
protected boolean catchExceptions;
/**
+ * This is the caught exception thrown in the run()
method. It
+ * is null if exceptions are ignored, the run method hasn't completed, or
+ * there were no exceptions.
+ *
+ * @serial the caught exception, if any
+ */
+ private Exception exception;
+
+ /**
* This is the caught Throwable thrown in the run()
method.
* It is null if throwables are ignored, the run method hasn't completed,
* or there were no throwables thrown.
@@ -184,6 +193,8 @@
catch (Throwable t)
{
throwable = t;
+ if (t instanceof Exception)
+ exception = (Exception)t;
}
else
runnable.run();
@@ -205,9 +216,7 @@
*/
public Exception getException()
{
- if (throwable == null || !(throwable instanceof Exception))
- return null;
- return (Exception) throwable;
+ return exception;
}
/**