Skip to content

Commit 7833751

Browse files
committed
Sometimes we should not wrap exception to rethrow it.
1 parent 6fc2f27 commit 7833751

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import static org.hamcrest.Matchers.not;
2323
import static org.junit.Assert.assertThat;
2424

25+
import com.google.common.base.Throwables;
26+
2527
import org.junit.AssumptionViolatedException;
2628
import org.junit.Before;
2729
import org.junit.Rule;
@@ -178,6 +180,7 @@ private void dealWithSauceFailureIfNecessary(Throwable t) {
178180
throw new RuntimeException("Sauce-related failure. Tried re-creating the driver, but that failed too.", t);
179181
}
180182
} else {
183+
Throwables.throwIfUnchecked(t);
181184
throw new RuntimeException(t);
182185
}
183186
}

0 commit comments

Comments
 (0)