1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 246737 Catching the RejectedExecutionException in GdbConnectCommand in case the session is shutdown.

This commit is contained in:
Marc Khouzam 2008-09-12 17:31:49 +00:00
parent d86c2f8bcb
commit 8968ec763d

View file

@ -13,6 +13,7 @@ package org.eclipse.dd.gdb.internal.ui.actions;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.RejectedExecutionException;
import org.eclipse.cdt.core.IProcessInfo;
import org.eclipse.core.runtime.CoreException;
@ -71,13 +72,15 @@ public class GdbConnectCommand implements IConnect {
}
}
};
fExecutor.execute(canConnectQuery);
try {
fExecutor.execute(canConnectQuery);
return canConnectQuery.get();
} catch (InterruptedException e) {
} catch (ExecutionException e) {
}
} catch (RejectedExecutionException e) {
// Can be thrown if the session is shutdown
}
return false;
}