diff options
author | Alain Magloire | 2003-12-08 16:39:13 +0000 |
---|---|---|
committer | Alain Magloire | 2003-12-08 16:39:13 +0000 |
commit | 1c9df5cdbd0a4342506a8066311655937cc3a2bb (patch) | |
tree | c90afacd422ecaa4d06bf4eb5095bb063034ca6d | |
parent | 4ec086bfd1ec07c332f93d4fc6663374d37f1281 (diff) | |
download | org.eclipse.cdt-1c9df5cdbd0a4342506a8066311655937cc3a2bb.tar.gz org.eclipse.cdt-1c9df5cdbd0a4342506a8066311655937cc3a2bb.tar.xz org.eclipse.cdt-1c9df5cdbd0a4342506a8066311655937cc3a2bb.zip |
new method terminate() to allow to pass the exception.
-rw-r--r-- | debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIInferior.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIInferior.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIInferior.java index caa7411cbc3..198bf3a459b 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIInferior.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIInferior.java @@ -142,6 +142,14 @@ public class MIInferior extends Process { * @see java.lang.Process#destroy() */ public void destroy() { + try { + terminate(); + } catch (MIException e) { + // do nothing. + } + } + + public void terminate() throws MIException { // An inferior will be destroy():interrupt and kill if // - For attach session: // the inferior was not disconnected yet (no need to try @@ -153,14 +161,11 @@ public class MIInferior extends Process { CommandFactory factory = session.getCommandFactory(); MIExecAbort abort = factory.createMIExecAbort(); - try { - // Try to interrupt the inferior, first. - interrupt(); - session.postCommand(abort); - abort.getMIInfo(); - setTerminated(abort.getToken(), true); - } catch (MIException e) { - } + // Try to interrupt the inferior, first. + interrupt(); + session.postCommand(abort); + abort.getMIInfo(); + setTerminated(abort.getToken(), true); } } |