From b22d79fa614271e8035632be34717e7f89291ebf Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Fri, 1 Nov 2002 16:43:53 +0000 Subject: [PATCH] Ignore the errror form "set new-console" --- .../org/eclipse/cdt/debug/mi/core/MIPlugin.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPlugin.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPlugin.java index 871596ffc96..6ec24b90fd7 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPlugin.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPlugin.java @@ -115,12 +115,17 @@ public class MIPlugin extends Plugin { MISession session = createMISession(pgdb, pty, MISession.PROGRAM); // 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} - CommandFactory factory = session.getCommandFactory(); - MIGDBSet set = factory.createMIGDBSet(new String[]{"new-console"}); - session.postCommand(set); - MIInfo info = set.getMIInfo(); - if (info == null) { - throw new MIException("No answer"); + try { + CommandFactory factory = session.getCommandFactory(); + MIGDBSet set = factory.createMIGDBSet(new String[]{"new-console"}); + session.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. } return new CSession(session, false); }