diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java index 8654fdd47a3..4372b3a6cc5 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java @@ -8,6 +8,7 @@ * Contributors: * Ericsson AB - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair + * Simon Marchi (Ericsson) - Make canRestart and restart throw Exception instead of Throwable. *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.framework; @@ -720,7 +721,7 @@ public class SyncUtil { /** * Check if the restart operation is supported */ - public static boolean canRestart() throws Throwable { + public static boolean canRestart() throws Exception { final IContainerDMContext containerDmc = getContainerContext(); // Check if restart is allowed @@ -748,7 +749,7 @@ public class SyncUtil { /** * Restart the program. */ - public static MIStoppedEvent restart(final GdbLaunch launch) throws Throwable { + public static MIStoppedEvent restart(final GdbLaunch launch) throws Exception { final IContainerDMContext containerDmc = getContainerContext(); // If we are calling this method, the restart operation should be allowed @@ -764,7 +765,6 @@ public class SyncUtil { // Perform the restart Query query2 = new Query() { - @SuppressWarnings("unchecked") @Override protected void execute(final DataRequestMonitor rm) { Map attributes = null; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java index 485396437a4..d618328c95e 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Ericsson and others. + * Copyright (c) 2011, 2014 Ericsson and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * Ericsson - Initial Implementation + * Simon Marchi (Ericsson) - Remove a catch that just fails a test. *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests; @@ -109,11 +110,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { wait(1000); } fRestart = false; - try { - SyncUtil.restart(getGDBLaunch()); - } catch (Throwable e) { - fail("Restart failed: " + e.getMessage()); - } + SyncUtil.restart(getGDBLaunch()); } }