diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java index c7b0f1b403d..4e016cc272c 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java @@ -54,10 +54,12 @@ import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.utils.spawner.ProcessFactory; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.InstanceScope; +import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.IBreakpointManager; import org.eclipse.debug.core.ILaunch; @@ -659,7 +661,17 @@ protected void assertLaunchTerminates(GdbLaunch launch, boolean terminate) throw @After public void doAfterTest() throws Exception { if (fLaunch != null) { - fLaunch.terminate(); + try { + fLaunch.terminate(); + } catch (DebugException e) { + IStatus status = e.getStatus(); + if (status != null) { + String statusString = status.toString(); + throw new RuntimeException("Received debug exception with: " + statusString, e); + } else { + throw new RuntimeException("Received debug with no status", e); + } + } assertLaunchTerminates(); fLaunch = null; }