Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public String getFactoryId() {
public void saveState(IMemento memento) {
if (shouldSaveFail) {
saveAttemptedWhileShouldFail = true;
throw new RuntimeException();
throw new TestException();
}

}
Expand All @@ -83,7 +83,7 @@ public void saveState(IMemento memento) {
public IAdaptable createElement(IMemento memento) {
if (shouldFailOnCreateElement) {
elementCreationAttemptedWhileShouldFail = true;
throw new RuntimeException();
throw new TestException();
}
return new BadElementInstance();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public void testListenerSafety() throws Throwable {
final boolean[] result = new boolean[1];
// add a bogus listener that dies unexpectedly
IPropertyChangeListener badListener = event -> {
throw new RuntimeException();
throw new TestException();

};
IPropertyChangeListener goodListener = event -> result[0] = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2024 Joerg Kubitz and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Joerg Kubitz - initial API and implementation
******************************************************************************/

package org.eclipse.ui.tests.api;

public class TestException extends RuntimeException {

private static final long serialVersionUID = 1L;

public TestException() {
super("Intentional TestException. Ignore me in the logfile.");
}

}
Loading