Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2010-03-10 19:11:17 +0000
committerPawel Piech2010-03-10 19:11:17 +0000
commitafa7312595e5420416c404dec56c63c4a9db4d83 (patch)
tree9c625fddec5f38ef4a82df175c5d3092876a83e3
parentc389d6d748be603606c11d6568f640f297e70471 (diff)
downloadorg.eclipse.cdt-afa7312595e5420416c404dec56c63c4a9db4d83.tar.gz
org.eclipse.cdt-afa7312595e5420416c404dec56c63c4a9db4d83.tar.xz
org.eclipse.cdt-afa7312595e5420416c404dec56c63c4a9db4d83.zip
[305376] - [concurrent] RejectedExecutionExeption is not properly handled in RequestMonitor
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java
index bb5d3fc079e..cf63ebcd195 100644
--- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java
+++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java
@@ -451,15 +451,23 @@ public class RequestMonitor extends DsfExecutable {
* Default handler for when the executor supplied in the constructor
* rejects the runnable that is submitted invoke this request monitor.
* This usually happens only when the executor is shutting down.
+ * <p>
+ * The default handler creates a new error status for the rejected
+ * execution and propagates it to the client or logs it.
*/
protected void handleRejectedExecutionException() {
- MultiStatus logStatus = new MultiStatus(DsfPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Request for monitor: '" + toString() + "' resulted in a rejected execution exception.", null); //$NON-NLS-1$ //$NON-NLS-2$
- logStatus.merge(getStatus());
+ IStatus rejectedStatus = new Status(IStatus.ERROR, DsfPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Request for monitor: '" + toString() + "' resulted in a rejected execution exception.", null); //$NON-NLS-1$ //$NON-NLS-2$
+ if (!getStatus().isOK()) {
+ DsfMultiStatus multiStatus = new DsfMultiStatus(DsfPlugin.PLUGIN_ID, 0, "Composite status", null); //$NON-NLS-1$
+ multiStatus.merge(getStatus());
+ multiStatus.merge(rejectedStatus);
+ rejectedStatus = multiStatus;
+ }
if (fParentRequestMonitor != null) {
- fParentRequestMonitor.setStatus(logStatus);
+ fParentRequestMonitor.setStatus(rejectedStatus);
fParentRequestMonitor.done();
} else {
- DsfPlugin.getDefault().getLog().log(logStatus);
+ DsfPlugin.getDefault().getLog().log(rejectedStatus);
}
}

Back to the top