diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 23:20:01 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 23:20:01 +0000 |
commit | 3b3101d8b5ae4f08a16c0b7111da6cad41bbd282 (patch) | |
tree | a5eb7cf42a51869cc8aa1fad7ad6a90cca47fdd8 /libjava/classpath/java/awt/event/InvocationEvent.java | |
parent | 7e55c49d7d91ef9f09e93c1100119b1ab3652446 (diff) | |
download | ppe42-gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.tar.gz ppe42-gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.zip |
Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated.
* Makefile.in: Likewise.
* scripts/makemake.tcl: Use glob -nocomplain.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107049 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java/awt/event/InvocationEvent.java')
-rw-r--r-- | libjava/classpath/java/awt/event/InvocationEvent.java | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/libjava/classpath/java/awt/event/InvocationEvent.java b/libjava/classpath/java/awt/event/InvocationEvent.java index 75feb62bd94..6f39d6b9130 100644 --- a/libjava/classpath/java/awt/event/InvocationEvent.java +++ b/libjava/classpath/java/awt/event/InvocationEvent.java @@ -107,6 +107,13 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent private Exception exception; /** + * This is the caught Throwable thrown in the <code>run()</code> method. + * It is null if throwables are ignored, the run method hasn't completed, + * or there were no throwables thrown. + */ + private Throwable throwable; + + /** * The timestamp when this event was created. * * @see #getWhen() @@ -183,9 +190,11 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent { runnable.run(); } - catch (Exception e) + catch (Throwable t) { - exception = e; + throwable = t; + if (t instanceof Exception) + exception = (Exception)t; } else runnable.run(); @@ -211,6 +220,18 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent } /** + * 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 + * @since 1.5 + */ + public Throwable getThrowable() + { + return throwable; + } + + /** * Gets the timestamp of when this event was created. * * @return the timestamp of this event |