/** * Check if any Exception is expected. * @since 4.13 */ public final boolean isAnyExceptionExpected() { return matcherBuilder.expectsThrowable(); }
@Override public void evaluate() throws Throwable { try { fNext.evaluate(); if (fMatcherBuilder.expectsThrowable()) { failDueToMissingException(); } } catch (AssumptionViolatedException e) { optionallyHandleException(e, handleAssumptionViolatedExceptions); } catch (AssertionError e) { optionallyHandleException(e, handleAssertionErrors); } catch (Throwable e) { handleException(e); } } }
private void handleException(Throwable e) throws Throwable { if (fMatcherBuilder.expectsThrowable()) { assertThat(e, fMatcherBuilder.build()); } else { throw e; } } }
@Override public void evaluate() throws Throwable { try { fNext.evaluate(); if (fMatcherBuilder.expectsThrowable()) { failDueToMissingException(); } } catch (AssumptionViolatedException e) { optionallyHandleException(e, handleAssumptionViolatedExceptions); } catch (AssertionError e) { optionallyHandleException(e, handleAssertionErrors); } catch (Throwable e) { handleException(e); } } }
private void handleException(Throwable e) throws Throwable { if (fMatcherBuilder.expectsThrowable()) { assertThat(e, fMatcherBuilder.build()); } else { throw e; } } }
private boolean isAnyExceptionExpected() { return matcherBuilder.expectsThrowable(); }
private boolean isAnyExceptionExpected() { return matcherBuilder.expectsThrowable(); }
@Override public void evaluate() throws Throwable { try { fNext.evaluate(); if (fMatcherBuilder.expectsThrowable()) { failDueToMissingException(); } } catch (AssumptionViolatedException e) { optionallyHandleException(e, handleAssumptionViolatedExceptions); } catch (AssertionError e) { optionallyHandleException(e, handleAssertionErrors); } catch (Throwable e) { handleException(e); } } }
@Override public void evaluate() throws Throwable { try { fNext.evaluate(); if (fMatcherBuilder.expectsThrowable()) { failDueToMissingException(); } } catch (AssumptionViolatedException e) { optionallyHandleException(e, handleAssumptionViolatedExceptions); } catch (AssertionError e) { optionallyHandleException(e, handleAssertionErrors); } catch (Throwable e) { handleException(e); } } }
private void handleException(Throwable e) throws Throwable { if (fMatcherBuilder.expectsThrowable()) { assertThat(e, fMatcherBuilder.build()); } else { throw e; } } }
private void handleException(Throwable e) throws Throwable { if (fMatcherBuilder.expectsThrowable()) { assertThat(e, fMatcherBuilder.build()); } else { throw e; } } }