/** * Instruct Awaitility to ignore caught exceptions matching the supplied <code>matcher</code> during condition evaluation. * Exceptions will be treated as evaluating to <code>false</code>. Your test will not fail * upon an exception matching the supplied exception type, unless it times out. */ public static void ignoreExceptionsByDefaultMatching(Matcher<? super Throwable> matcher) { defaultExceptionIgnorer = new HamcrestExceptionIgnorer(matcher); }
/** * Instruct Awaitility to ignore exceptions that occur during evaluation and matches the supplied Hamcrest matcher. * Exceptions will be treated as evaluating to * <code>false</code>. This is useful in situations where the evaluated conditions may temporarily throw exceptions. * * @return the condition factory. */ public ConditionFactory ignoreExceptionsMatching(Matcher<? super Throwable> matcher) { return new ConditionFactory(alias, timeoutConstraint, pollInterval, pollDelay, catchUncaughtExceptions, new HamcrestExceptionIgnorer(matcher), conditionEvaluationListener, executorLifecycle); }
/** * Instruct Awaitility to ignore caught exceptions matching the supplied <code>matcher</code> during condition evaluation. * Exceptions will be treated as evaluating to <code>false</code>. Your test will not fail * upon an exception matching the supplied exception type, unless it times out. */ public static void ignoreExceptionsByDefaultMatching(Matcher<? super Throwable> matcher) { defaultExceptionIgnorer = new HamcrestExceptionIgnorer(matcher); }
/** * Instruct Awaitility to ignore exceptions that occur during evaluation and matches the supplied Hamcrest matcher. * Exceptions will be treated as evaluating to * <code>false</code>. This is useful in situations where the evaluated conditions may temporarily throw exceptions. * * @return the condition factory. */ public ConditionFactory ignoreExceptionsMatching(Matcher<? super Throwable> matcher) { return new ConditionFactory(alias, timeoutConstraint, pollInterval, pollDelay, catchUncaughtExceptions, new HamcrestExceptionIgnorer(matcher), conditionEvaluationListener, executorLifecycle); }