Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated.
* Makefile.in: Likewise.
* scripts/makemake.tcl: Use glob -nocomplain.
From-SVN: r107049
This commit is contained in:
@@ -106,6 +106,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.
|
||||
*
|
||||
@@ -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();
|
||||
@@ -210,6 +219,18 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent
|
||||
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
|
||||
* @since 1.5
|
||||
*/
|
||||
public Throwable getThrowable()
|
||||
{
|
||||
return throwable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the timestamp of when this event was created.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user