Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Marchi2015-01-16 17:51:07 +0000
committerMarc Khouzam2015-01-16 19:43:20 +0000
commit41065c06e11155acaf4c1fcd7bef13f001cf3c33 (patch)
tree43357b478d2d0ff6c30925d202a5d669d8e3e661
parentac6e5420d9a0cba37460296d4e63d25ae0bcdc38 (diff)
downloadorg.eclipse.cdt-41065c06e11155acaf4c1fcd7bef13f001cf3c33.tar.gz
org.eclipse.cdt-41065c06e11155acaf4c1fcd7bef13f001cf3c33.tar.xz
org.eclipse.cdt-41065c06e11155acaf4c1fcd7bef13f001cf3c33.zip
Debug BaseTestCase: don't swallow exception
Catching the exception and asserting false just hides the real reason, making failures harder to debug. Change-Id: I1a73fb5893da2762d0b9a9a496749643471f75b4 Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca> Reviewed-on: https://git.eclipse.org/r/39787 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java15
1 files changed, 5 insertions, 10 deletions
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 e008c5b157f..56d8f27dace 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
@@ -43,7 +43,6 @@ 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.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
@@ -372,16 +371,12 @@ public class BaseTestCase {
}
- @After
+ @After
public void doAfterTest() throws Exception {
- if (fLaunch != null) {
- try {
- fLaunch.terminate();
- } catch (DebugException e) {
- assert false : "Could not terminate launch";
- }
- fLaunch = null;
- }
+ if (fLaunch != null) {
+ fLaunch.terminate();
+ fLaunch = null;
+ }
}
/**

Back to the top