parent
70fd753e48
commit
e21dac0f13
|
@ -216,11 +216,11 @@ public class VavrUnitTest {
|
||||||
assertEquals(-1, errorSentinel);
|
assertEquals(-1, errorSentinel);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Test(expected = ArithmeticException.class)
|
@Test(expected = RuntimeException.class)
|
||||||
// public void givenBadCode_whenTryHandles_thenCorrect3() {
|
public void givenBadCode_whenTryHandles_thenCorrect3() {
|
||||||
// Try<Integer> result = Try.of(() -> 1 / 0);
|
Try<Integer> result = Try.of(() -> 1 / 0);
|
||||||
// result.getOrElseThrow(ArithmeticException::new);
|
result.getOrElseThrow(e->new RuntimeException(e));//re-throw different ex type
|
||||||
// }
|
}
|
||||||
|
|
||||||
// lazy
|
// lazy
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue