mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 21:05:37 +02:00
Make sure the session is terminated if
an exception is thrown.
This commit is contained in:
parent
8dd35316c0
commit
6bfd40852c
5 changed files with 204 additions and 63 deletions
|
@ -28,15 +28,15 @@ import org.eclipse.debug.core.ILaunchConfiguration;
|
||||||
*/
|
*/
|
||||||
public class CygwinGDBDebugger extends GDBDebugger {
|
public class CygwinGDBDebugger extends GDBDebugger {
|
||||||
|
|
||||||
static final CygwinCommandFactory commandFactory =
|
static final CygwinCommandFactory commandFactory = new CygwinCommandFactory();
|
||||||
new CygwinCommandFactory();
|
|
||||||
|
|
||||||
protected void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException {
|
protected void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException {
|
||||||
try {
|
try {
|
||||||
ICDISharedLibraryManager manager = session.getSharedLibraryManager();
|
ICDISharedLibraryManager manager = session.getSharedLibraryManager();
|
||||||
if (manager instanceof SharedLibraryManager) {
|
if (manager instanceof SharedLibraryManager) {
|
||||||
SharedLibraryManager mgr = (SharedLibraryManager)manager;
|
SharedLibraryManager mgr = (SharedLibraryManager) manager;
|
||||||
boolean stopOnSolibEvents = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false);
|
boolean stopOnSolibEvents =
|
||||||
|
config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false);
|
||||||
try {
|
try {
|
||||||
mgr.setStopOnSolibEvents(stopOnSolibEvents);
|
mgr.setStopOnSolibEvents(stopOnSolibEvents);
|
||||||
// By default, we provide with the capability of deferred breakpoints
|
// By default, we provide with the capability of deferred breakpoints
|
||||||
|
@ -57,7 +57,7 @@ public class CygwinGDBDebugger extends GDBDebugger {
|
||||||
if (p.size() > 0) {
|
if (p.size() > 0) {
|
||||||
String[] oldPaths = manager.getSharedLibraryPaths();
|
String[] oldPaths = manager.getSharedLibraryPaths();
|
||||||
String[] paths = new String[oldPaths.length + p.size()];
|
String[] paths = new String[oldPaths.length + p.size()];
|
||||||
System.arraycopy((String[])p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
System.arraycopy((String[]) p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
||||||
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
||||||
manager.setSharedLibraryPaths(paths);
|
manager.setSharedLibraryPaths(paths);
|
||||||
}
|
}
|
||||||
|
@ -66,52 +66,90 @@ public class CygwinGDBDebugger extends GDBDebugger {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICDISession createLaunchSession(
|
public ICDISession createLaunchSession(ILaunchConfiguration config, IFile exe) throws CDIException {
|
||||||
ILaunchConfiguration config,
|
Session session = null;
|
||||||
IFile exe)
|
boolean failed = false;
|
||||||
throws CDIException {
|
|
||||||
Session session = (Session) super.createLaunchSession(config, exe);
|
|
||||||
session.getMISession().setCommandFactory(commandFactory);
|
|
||||||
// For windows we need to start the inferior in a new console window
|
|
||||||
// to separate the Inferior std{in,out,err} from gdb std{in,out,err}
|
|
||||||
MISession mi = session.getMISession();
|
|
||||||
try {
|
try {
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
session = (Session) super.createLaunchSession(config, exe);
|
||||||
MIGDBSet set = factory.createMIGDBSet(new String[]{"new-console"});
|
session.getMISession().setCommandFactory(commandFactory);
|
||||||
mi.postCommand(set);
|
// For windows we need to start the inferior in a new console window
|
||||||
MIInfo info = set.getMIInfo();
|
// to separate the Inferior std{in,out,err} from gdb std{in,out,err}
|
||||||
if (info == null) {
|
MISession mi = session.getMISession();
|
||||||
throw new MIException("No answer");
|
try {
|
||||||
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
MIGDBSet set = factory.createMIGDBSet(new String[] { "new-console" });
|
||||||
|
mi.postCommand(set);
|
||||||
|
MIInfo info = set.getMIInfo();
|
||||||
|
if (info == null) {
|
||||||
|
throw new MIException("No answer");
|
||||||
|
}
|
||||||
|
} catch (MIException e) {
|
||||||
|
// We ignore this exception, for example
|
||||||
|
// on GNU/Linux the new-console is an error.
|
||||||
|
}
|
||||||
|
initializeLibraries(config, session);
|
||||||
|
return session;
|
||||||
|
} catch (CDIException e) {
|
||||||
|
failed = true;
|
||||||
|
throw e;
|
||||||
|
} finally {
|
||||||
|
if (failed) {
|
||||||
|
if (session != null) {
|
||||||
|
try {
|
||||||
|
session.terminate();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// ignore the exception here.
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
|
||||||
// We ignore this exception, for example
|
|
||||||
// on GNU/Linux the new-console is an error.
|
|
||||||
}
|
}
|
||||||
initializeLibraries(config, session);
|
|
||||||
return session;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICDISession createAttachSession(
|
public ICDISession createAttachSession(ILaunchConfiguration config, IFile exe, int pid) throws CDIException {
|
||||||
ILaunchConfiguration config,
|
Session session = null;
|
||||||
IFile exe,
|
boolean failed = false;
|
||||||
int pid)
|
try {
|
||||||
throws CDIException {
|
session = (Session) super.createAttachSession(config, exe, pid);
|
||||||
Session session =
|
session.getMISession().setCommandFactory(commandFactory);
|
||||||
(Session) super.createAttachSession(config, exe, pid);
|
initializeLibraries(config, session);
|
||||||
session.getMISession().setCommandFactory(commandFactory);
|
return session;
|
||||||
initializeLibraries(config, session);
|
} catch (CDIException e) {
|
||||||
return session;
|
failed = true;
|
||||||
|
throw e;
|
||||||
|
} finally {
|
||||||
|
if (failed) {
|
||||||
|
if (session != null) {
|
||||||
|
try {
|
||||||
|
session.terminate();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// ignore the exception here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICDISession createCoreSession(
|
public ICDISession createCoreSession(ILaunchConfiguration config, IFile exe, IPath corefile) throws CDIException {
|
||||||
ILaunchConfiguration config,
|
Session session = null;
|
||||||
IFile exe,
|
boolean failed = false;
|
||||||
IPath corefile)
|
try {
|
||||||
throws CDIException {
|
session = (Session) super.createCoreSession(config, exe, corefile);
|
||||||
Session session =
|
session.getMISession().setCommandFactory(commandFactory);
|
||||||
(Session) super.createCoreSession(config, exe, corefile);
|
initializeLibraries(config, session);
|
||||||
session.getMISession().setCommandFactory(commandFactory);
|
return session;
|
||||||
initializeLibraries(config, session);
|
} catch (CDIException e) {
|
||||||
return session;
|
failed = true;
|
||||||
|
throw e;
|
||||||
|
} finally {
|
||||||
|
if (failed) {
|
||||||
|
if (session != null) {
|
||||||
|
try {
|
||||||
|
session.terminate();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// ignore the exception here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,54 +61,98 @@ public class GDBDebugger implements ICDebugger {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICDISession createLaunchSession(ILaunchConfiguration config, IFile exe) throws CDIException {
|
public ICDISession createLaunchSession(ILaunchConfiguration config, IFile exe) throws CDIException {
|
||||||
|
Session session = null;
|
||||||
|
boolean failed = false;
|
||||||
try {
|
try {
|
||||||
String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
||||||
File cwd = exe.getProject().getLocation().toFile();
|
File cwd = exe.getProject().getLocation().toFile();
|
||||||
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
||||||
Session session = (Session)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toFile(), cwd, gdbinit);
|
session = (Session)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toFile(), cwd, gdbinit);
|
||||||
initializeLibraries(config, session);
|
initializeLibraries(config, session);
|
||||||
return session;
|
return session;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
|
} finally {
|
||||||
|
if (failed) {
|
||||||
|
if (session != null) {
|
||||||
|
try {
|
||||||
|
session.terminate();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// ignore the exception here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICDISession createAttachSession(ILaunchConfiguration config, IFile exe, int pid) throws CDIException {
|
public ICDISession createAttachSession(ILaunchConfiguration config, IFile exe, int pid) throws CDIException {
|
||||||
|
Session session = null;
|
||||||
|
boolean failed = false;
|
||||||
try {
|
try {
|
||||||
String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
||||||
File cwd = exe.getProject().getLocation().toFile();
|
File cwd = exe.getProject().getLocation().toFile();
|
||||||
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
||||||
Session session = (Session)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toFile(), pid, null, cwd, gdbinit);
|
session = (Session)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toFile(), pid, null, cwd, gdbinit);
|
||||||
initializeLibraries(config, session);
|
initializeLibraries(config, session);
|
||||||
return session;
|
return session;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
|
} finally {
|
||||||
|
if (failed) {
|
||||||
|
if (session != null) {
|
||||||
|
try {
|
||||||
|
session.terminate();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// ignore the exception here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICDISession createCoreSession(ILaunchConfiguration config, IFile exe, IPath corefile) throws CDIException {
|
public ICDISession createCoreSession(ILaunchConfiguration config, IFile exe, IPath corefile) throws CDIException {
|
||||||
|
Session session = null;
|
||||||
|
boolean failed = false;
|
||||||
try {
|
try {
|
||||||
String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
||||||
File cwd = exe.getProject().getLocation().toFile();
|
File cwd = exe.getProject().getLocation().toFile();
|
||||||
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
||||||
Session session = (Session)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toFile(), corefile.toFile(), cwd, gdbinit);
|
session = (Session)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toFile(), corefile.toFile(), cwd, gdbinit);
|
||||||
initializeLibraries(config, session);
|
initializeLibraries(config, session);
|
||||||
return session;
|
return session;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error creating session: " + e.getMessage());
|
throw new CDIException("Error creating session: " + e.getMessage());
|
||||||
|
} finally {
|
||||||
|
if (failed) {
|
||||||
|
if (session != null) {
|
||||||
|
try {
|
||||||
|
session.terminate();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// ignore the exception here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,11 +56,12 @@ public class GDBServerDebugger implements ICDebugger {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICDISession createLaunchSession(ILaunchConfiguration config, IFile exe) throws CDIException {
|
public ICDISession createLaunchSession(ILaunchConfiguration config, IFile exe) throws CDIException {
|
||||||
|
Session session = null;
|
||||||
|
boolean failed = false;
|
||||||
try {
|
try {
|
||||||
String gdb = config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
String gdb = config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
||||||
File cwd = exe.getProject().getLocation().toFile();
|
File cwd = exe.getProject().getLocation().toFile();
|
||||||
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
||||||
Session session = null;
|
|
||||||
if (config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, false)) {
|
if (config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, false)) {
|
||||||
String remote = config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_HOST, "invalid");
|
String remote = config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_HOST, "invalid");
|
||||||
remote += ":";
|
remote += ":";
|
||||||
|
@ -82,25 +83,36 @@ public class GDBServerDebugger implements ICDebugger {
|
||||||
miSession.postCommand(setRemoteBaud, launchTimeout);
|
miSession.postCommand(setRemoteBaud, launchTimeout);
|
||||||
MIInfo info = setRemoteBaud.getMIInfo();
|
MIInfo info = setRemoteBaud.getMIInfo();
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
session.terminate();
|
|
||||||
throw new MIException ("Can not set Baud");
|
throw new MIException ("Can not set Baud");
|
||||||
}
|
}
|
||||||
MITargetSelect select = factory.createMITargetSelect(new String[] {"remote", remote});
|
MITargetSelect select = factory.createMITargetSelect(new String[] {"remote", remote});
|
||||||
miSession.postCommand(select, launchTimeout);
|
miSession.postCommand(select, launchTimeout);
|
||||||
select.getMIInfo();
|
select.getMIInfo();
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
session.terminate();
|
|
||||||
throw new MIException ("No answer");
|
throw new MIException ("No answer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initializeLibraries(config, session);
|
initializeLibraries(config, session);
|
||||||
return session;
|
return session;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error initializing: " + e.getMessage());
|
throw new CDIException("Error initializing: " + e.getMessage());
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error initializing: " + e.getMessage());
|
throw new CDIException("Error initializing: " + e.getMessage());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
failed = true;
|
||||||
throw new CDIException("Error initializing: " + e.getMessage());
|
throw new CDIException("Error initializing: " + e.getMessage());
|
||||||
|
} finally {
|
||||||
|
if (failed) {
|
||||||
|
if (session != null) {
|
||||||
|
try {
|
||||||
|
session.terminate();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// ignore the exception here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.OutputStream;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
|
@ -99,11 +100,39 @@ public class MIPlugin extends Plugin {
|
||||||
*/
|
*/
|
||||||
public ICDISession createCSession(String gdb, File program, File cwd, String gdbinit) throws IOException, MIException {
|
public ICDISession createCSession(String gdb, File program, File cwd, String gdbinit) throws IOException, MIException {
|
||||||
PTY pty = null;
|
PTY pty = null;
|
||||||
|
boolean failed = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pty = new PTY();
|
pty = new PTY();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
return createCSession(gdb, program, cwd, gdbinit, pty);
|
|
||||||
|
try {
|
||||||
|
return createCSession(gdb, program, cwd, gdbinit, pty);
|
||||||
|
} catch (IOException exc) {
|
||||||
|
failed = true;
|
||||||
|
throw exc;
|
||||||
|
} catch (MIException exc) {
|
||||||
|
failed = true;
|
||||||
|
throw exc;
|
||||||
|
} finally {
|
||||||
|
if (failed) {
|
||||||
|
// Shutdown the pty console.
|
||||||
|
if (pty != null) {
|
||||||
|
try {
|
||||||
|
OutputStream out = pty.getOutputStream();
|
||||||
|
if (out != null) {
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
InputStream in = pty.getInputStream();
|
||||||
|
if (in != null) {
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -290,7 +319,7 @@ public class MIPlugin extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do some basic synchronisation, gdb make take some time to load
|
* Do some basic synchronisation, gdb may take some time to load
|
||||||
* for whatever reasons.
|
* for whatever reasons.
|
||||||
* @param args
|
* @param args
|
||||||
* @return Process
|
* @return Process
|
||||||
|
|
|
@ -136,17 +136,35 @@ public class MISession extends Observable {
|
||||||
// Disable a certain number of irritations from gdb.
|
// Disable a certain number of irritations from gdb.
|
||||||
// Like confirmation and screen size.
|
// Like confirmation and screen size.
|
||||||
|
|
||||||
MIGDBSet confirm = new MIGDBSet(new String[]{"confirm", "off"});
|
try {
|
||||||
postCommand(confirm, launchTimeout);
|
MIGDBSet confirm = new MIGDBSet(new String[]{"confirm", "off"});
|
||||||
confirm.getMIInfo();
|
postCommand(confirm, launchTimeout);
|
||||||
|
confirm.getMIInfo();
|
||||||
|
|
||||||
MIGDBSet width = new MIGDBSet(new String[]{"width", "0"});
|
MIGDBSet width = new MIGDBSet(new String[]{"width", "0"});
|
||||||
postCommand(width, launchTimeout);
|
postCommand(width, launchTimeout);
|
||||||
confirm.getMIInfo();
|
confirm.getMIInfo();
|
||||||
|
|
||||||
MIGDBSet height = new MIGDBSet(new String[]{"height", "0"});
|
MIGDBSet height = new MIGDBSet(new String[]{"height", "0"});
|
||||||
postCommand(height, launchTimeout);
|
postCommand(height, launchTimeout);
|
||||||
confirm.getMIInfo();
|
confirm.getMIInfo();
|
||||||
|
|
||||||
|
} catch (MIException exc) {
|
||||||
|
// Kill the Transmition thread.
|
||||||
|
if (txThread.isAlive()) {
|
||||||
|
txThread.interrupt();
|
||||||
|
}
|
||||||
|
// Kill the Receiving Thread.
|
||||||
|
if (rxThread.isAlive()) {
|
||||||
|
rxThread.interrupt();
|
||||||
|
}
|
||||||
|
// Kill the event Thread.
|
||||||
|
if (eventThread.isAlive()) {
|
||||||
|
eventThread.interrupt();
|
||||||
|
}
|
||||||
|
// rethrow up the exception.
|
||||||
|
throw exc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue