Skip to content

Commit

Permalink
Pass exceptions up the stack
Browse files Browse the repository at this point in the history
Make sure not to lose stack trace when a test fails.

Part of #117
  • Loading branch information
jonahgraham committed Nov 7, 2022
1 parent 75e52e4 commit 1cdf58a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public static void delete(ICProject cproject) {
System.runFinalization();
cproject.getProject().delete(true, true, null);
} catch (CoreException e2) {
Assert.fail(getMessage(e2.getStatus()));
throw new AssertionError("Failed to delete project", e2);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;

Expand Down Expand Up @@ -108,12 +107,7 @@ protected IASTNode testF3(IFile file, int offset, int length, ITargetDisambiguat
throw new ParserException("offset can not be less than 0 and was " + offset); //$NON-NLS-1$

IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart part = null;
try {
part = page.openEditor(new FileEditorInput(file), "org.eclipse.cdt.ui.editor.CEditor"); //$NON-NLS-1$
} catch (PartInitException e) {
assertFalse(true);
}
IEditorPart part = page.openEditor(new FileEditorInput(file), "org.eclipse.cdt.ui.editor.CEditor"); //$NON-NLS-1$

if (part instanceof CEditor) {
CEditor editor = (CEditor) part;
Expand Down

0 comments on commit 1cdf58a

Please sign in to comment.