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

Throw OperationCanceledException instead of IOException when getGDBprocess is canceled.

This commit is contained in:
Mikhail Khodjaiants 2006-03-31 19:57:18 +00:00
parent d7a3d94652
commit ae43d3b681
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2006-03-31 Mikhail Khodjaiants
Throw OperationCanceledException instead of IOException when getGDBprocess is canceled.
* MIProcessAdapter.java
2006-03-27 Mikhail Khodjaiants 2006-03-27 Mikhail Khodjaiants
Cleaned up the "Session" class constructors. Cleaned up the "Session" class constructors.
* Session.java * Session.java

View file

@ -21,6 +21,7 @@ import java.io.Reader;
import org.eclipse.cdt.utils.spawner.ProcessFactory; import org.eclipse.cdt.utils.spawner.ProcessFactory;
import org.eclipse.cdt.utils.spawner.Spawner; import org.eclipse.cdt.utils.spawner.Spawner;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
/** /**
*/ */
@ -96,8 +97,7 @@ public class MIProcessAdapter implements MIProcess {
} }
if (monitor.isCanceled()) { if (monitor.isCanceled()) {
pgdb.destroy(); pgdb.destroy();
String message = MIPlugin.getResourceString("src.GDBDebugger.Error_creating_session");//$NON-NLS-1$ throw new OperationCanceledException();
throw new IOException(message);
} else if (timepass > launchTimeout) { } else if (timepass > launchTimeout) {
pgdb.destroy(); pgdb.destroy();
String message = MIPlugin.getResourceString("src.GDBDebugger.Error_launch_timeout"); //$NON-NLS-1$ String message = MIPlugin.getResourceString("src.GDBDebugger.Error_launch_timeout"); //$NON-NLS-1$