code: public static <V> Predicate<TaskContext<V>> ifException(Predicate<? super Exception> predicate) {
          return ctx -> predicate.test(ctx.getException());
      }
docs: If the task throws some exceptions, the task will be retried.
  
  @param predicate The exception predicate.
  @param <V>       The return value type.
  @return The retry strategy predicate.