From 9360ad3bbeea9bad2fe1bc44cae8d154c6968b3d Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Mon, 7 Apr 2003 22:45:11 +0000 Subject: [PATCH] Changed the messages of CDI exceptions. --- debug/org.eclipse.cdt.debug.mi.core/ChangeLog | 5 +++ .../eclipse/cdt/debug/mi/core/MISession.java | 4 +- .../cdt/debug/mi/core/cdi/model/Target.java | 38 +++++++++---------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog index 246128b1127..45848c9e318 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -1,3 +1,8 @@ +2003-04-07 Mikhail Khodjaiants + Changed the messages of CDI exceptions. + * MISession.java + * Target.java + 2003-04-04 Alain Magloire Code from Monta Vista to add a Session via GDBServer. diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java index 2c1c2a9de27..ba4a9dd99f7 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java @@ -288,7 +288,7 @@ public class MISession extends Observable { // REMINDER: if we support -exec-interrupt // Let it throught: // if (cmd instanceof MIExecInterrupt) { } - throw new MIException("Target running"); + throw new MIException("Target is not suspended"); } txQueue.addCommand(cmd); @@ -301,7 +301,7 @@ public class MISession extends Observable { try { cmd.wait(timeout); if (cmd.getMIOutput() == null) { - throw new MIException("Timedout"); + throw new MIException("Target is not responding (timed out)"); } } catch (InterruptedException e) { } diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java index e7af790fdaf..c0439de6a37 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java @@ -87,7 +87,7 @@ public class Target implements ICDITarget { if (cthread instanceof Thread) { setCurrentThread(cthread, true); } else { - throw new CDIException("unknown thread"); + throw new CDIException("Unknown thread"); } } @@ -95,7 +95,7 @@ public class Target implements ICDITarget { if (cthread instanceof Thread) { setCurrentThread((Thread)cthread, doUpdate); } else { - throw new CDIException("unknown thread"); + throw new CDIException("Unknown thread"); } } @@ -119,7 +119,7 @@ public class Target implements ICDITarget { mi.postCommand(select); MIThreadSelectInfo info = select.getMIThreadSelectInfo(); if (info == null) { - throw new CDIException("No Answer"); + throw new CDIException("Target is not responding"); } currentThreadId = info.getNewThreadId(); } catch (MIException e) { @@ -307,7 +307,7 @@ public class Target implements ICDITarget { mi.postCommand(run); MIInfo info = run.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -321,7 +321,7 @@ public class Target implements ICDITarget { public void resume() throws CDIException { MISession mi = session.getMISession(); if (mi.getMIInferior().isRunning()) { - throw new CDIException("Inferior already running"); + throw new CDIException("Inferior is already running"); } else if (mi.getMIInferior().isSuspended()) { CommandFactory factory = mi.getCommandFactory(); MIExecContinue cont = factory.createMIExecContinue(); @@ -329,7 +329,7 @@ public class Target implements ICDITarget { mi.postCommand(cont); MIInfo info = cont.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -353,7 +353,7 @@ public class Target implements ICDITarget { mi.postCommand(step); MIInfo info = step.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -372,7 +372,7 @@ public class Target implements ICDITarget { mi.postCommand(stepi); MIInfo info = stepi.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -391,7 +391,7 @@ public class Target implements ICDITarget { mi.postCommand(next); MIInfo info = next.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -410,7 +410,7 @@ public class Target implements ICDITarget { mi.postCommand(nexti); MIInfo info = nexti.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -446,7 +446,7 @@ public class Target implements ICDITarget { mi.postCommand(finish); MIInfo info = finish.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -464,7 +464,7 @@ public class Target implements ICDITarget { mi.postCommand(ret); MIInfo info = ret.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -488,7 +488,7 @@ public class Target implements ICDITarget { } } if (isRunning()) { - throw new CDIException("Failed to suspend"); + throw new CDIException("Unable to suspend target"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -506,7 +506,7 @@ public class Target implements ICDITarget { mi.postCommand(detach); MIInfo info = detach.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -537,7 +537,7 @@ public class Target implements ICDITarget { mi.postCommand(until); MIInfo info = until.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -565,7 +565,7 @@ public class Target implements ICDITarget { mi.postCommand(jump); MIInfo info = jump.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -587,7 +587,7 @@ public class Target implements ICDITarget { MIDataEvaluateExpressionInfo info = evaluate.getMIDataEvaluateExpressionInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } return info.getExpression(); } catch (MIException e) { @@ -646,7 +646,7 @@ public class Target implements ICDITarget { mi.postCommand(signal); MIInfo info = signal.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e); @@ -665,7 +665,7 @@ public class Target implements ICDITarget { mi.postCommand(sig); MIInfo info = sig.getMIInfo(); if (info == null) { - throw new CDIException("No answer"); + throw new CDIException("Target is not responding"); } } catch (MIException e) { throw new MI2CDIException(e);