1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

[305949] Allow to cleanly cancel a progress monitor during a launch

This commit is contained in:
Marc Khouzam 2010-03-16 03:14:08 +00:00
parent 833ccaaee1
commit b94d0419e9

View file

@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.launching;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import org.eclipse.cdt.core.model.ICProject;
@ -140,6 +141,9 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2
throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, "Interrupted Exception in dispatch thread", e1)); //$NON-NLS-1$
} catch (ExecutionException e1) {
throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Error in services launch sequence", e1.getCause())); //$NON-NLS-1$
} catch (CancellationException e1) {
// Launch aborted, so exit cleanly
return;
}
if (monitor.isCanceled())
@ -173,6 +177,9 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2
throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, "Interrupted Exception in dispatch thread", e1)); //$NON-NLS-1$
} catch (ExecutionException e1) {
throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Error in final launch sequence", e1.getCause())); //$NON-NLS-1$
} catch (CancellationException e1) {
// Launch aborted, so exit cleanly
return;
} finally {
if (!succeed) {
// finalLaunchSequence failed. Shutdown the session so that all started