title: Using Checked exceptions along with java.util.function.Predicate
body: <p>Predicates are an awesome concept introduced since 1.8. The composition (and/or) along with other features they provide really makes life easier.</p>
  
  <p>I have been using them extensively for quite sometime, until recently I got stuck with one of the use-cases with respect to exception handling (for checked exceptions) : </p>
  
  <p><strong>Background :</strong>
  I want my predicate implementations to be able to throw out some checked exceptions, which the caller should be able to catch and act upon accordingly. (Some <code>PredicateExecutionFailedException</code>). Since there is no such exception being thrown in JDK's <code>java.util.Predicate</code> definition, I cannot throw any such exception from my implementation. I feel this is a missing piece which would have given more flexibility to the client calling the predicates. Below is the snippet from JDK 1.8.</p>
  
  <pre><code>@FunctionalInterface
  public interface Predicate&lt;T&gt; {
  
      /**
       * Evaluates this predicate on the given argument.
       *
       * @param t the input argument
       * @return {@code true} if the input argument matches the predicate,
       * otherwise {@code false}
       */
      boolean test(T t);
  
      /**
       * Returns a composed predicate that represents a short-circuiting logical
       * AND of this predicate and another.  When evaluating the composed
       * predicate, if this predicate is {@code false}, then the {@code other}
       * predicate is not evaluated.
       *
  </code></pre>
  
  <p><strong>Question</strong> :
  Is there any workaround? I want to catch only checked exceptions (no <code>RuntimeException</code> should be caught). Not able to get my head around this. Any suggestions are welcome.</p>