From: <va...@us...> - 2007-03-01 05:51:12
|
Revision: 9050 http://svn.sourceforge.net/jedit/?rev=9050&view=rev Author: vanza Date: 2007-02-28 21:51:10 -0800 (Wed, 28 Feb 2007) Log Message: ----------- add a method that might be useful for error reporting. Modified Paths: -------------- plugins/CommonControls/trunk/common/threads/WorkRequest.java Modified: plugins/CommonControls/trunk/common/threads/WorkRequest.java =================================================================== --- plugins/CommonControls/trunk/common/threads/WorkRequest.java 2007-03-01 05:08:20 UTC (rev 9049) +++ plugins/CommonControls/trunk/common/threads/WorkRequest.java 2007-03-01 05:51:10 UTC (rev 9050) @@ -35,6 +35,7 @@ private volatile boolean done; private Object lock; private Runnable work; + private Exception error; public WorkRequest(Runnable work) { @@ -63,12 +64,23 @@ } } + /** + * Returns any exception that was caught while running the request. + * + * @since CC 0.9.4 + */ + public Exception getError() + { + return error; + } + protected void run() { try { work.run(); } catch (Exception e) { Log.log(Log.ERROR, this, e); + error = e; } synchronized (lock) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |