mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Pass exceptions up the stack
Make sure not to lose stack trace when a test fails. Part of #117
This commit is contained in:
parent
75e52e4682
commit
1cdf58a663
2 changed files with 2 additions and 8 deletions
|
@ -265,7 +265,7 @@ public class CProjectHelper {
|
|||
System.runFinalization();
|
||||
cproject.getProject().delete(true, true, null);
|
||||
} catch (CoreException e2) {
|
||||
Assert.fail(getMessage(e2.getStatus()));
|
||||
throw new AssertionError("Failed to delete project", e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ import org.eclipse.jface.text.TextSelection;
|
|||
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;
|
||||
|
||||
|
@ -108,12 +107,7 @@ public abstract class BaseSelectionTests extends BaseUITestCase {
|
|||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue