1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-17 22:15:23 +02:00

[dsf-gdb] debug tests: Remove useless try/catch

The try/catch doesn't add anything. If getStackTrace throws, the test
will fail and will show the useful stack trace.

Change-Id: Icf453ff2ca6c10a32f264fece0f0db9af8049612
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
This commit is contained in:
Simon Marchi 2015-04-30 16:52:56 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent 9d848e3ede
commit c4f5c35620
2 changed files with 2 additions and 9 deletions

View file

@ -384,7 +384,7 @@ public class SyncUtil {
return resumeUntilStopped(timeout);
}
public static IFrameDMContext getStackFrame(final IExecutionDMContext execCtx, final int level) throws Throwable {
public static IFrameDMContext getStackFrame(final IExecutionDMContext execCtx, final int level) throws Exception {
Query<IFrameDMContext> query = new Query<IFrameDMContext>() {
@Override
protected void execute(final DataRequestMonitor<IFrameDMContext> rm) {

View file

@ -155,14 +155,7 @@ public class MIRegistersTest extends BaseTestCase {
fSession.getExecutor().submit(runnable).get();
//resolve the execution context
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
IFrameDMContext frameDmc = null;
try {
frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
} catch (Throwable e1) {
e1.printStackTrace();
fail("Initialization problem");
}
IFrameDMContext frameDmc = SyncUtil.getStackFrame(getInitialStoppedEvent().getDMContext(), 0);
//resolve the container context
IContainerDMContext containerDmc = DMContexts.getAncestorOfType(getInitialStoppedEvent().getDMContext(), IContainerDMContext.class);