title: What could be a better way to achieve Checked Exception handling in mapping functions passed to Java 8 Streams
body: <p>I have a simple scenario which I am trying to code without being clumsy and without writing unreadable multiline lambdas.</p>
  
  <pre><code>public class StreamTest {
  
      public static void main(String[] args) {
          List&lt;String&gt; list = Arrays.asList("hellow", "world");
          Stream&lt;String&gt; stream = list.stream().map(StreamTest::exceptionThrowingMappingFunction);
  
      }
  
      public static String exceptionThrowingMappingFunction(String s) throws Exception {
          if (s.equals("world")) {
              throw new Exception("world is doomed");
          }
          return s + " exists";
      }
  }
  </code></pre>
  
  <p>What I would like to have are the following options:</p>
  
  <ol>
  <li>Fail the whole stream if the exception is thrown</li>
  <li>Skip the value and continue with the rest of the stream if exception occurs</li>
  </ol>
  
  <p>I know about popular ways of dealing with this, like throwing a RuntimeException in a custom FunctionalInterface or just handling the exception inline.</p>
  
  <p>But is there some way, where I can extend Streams and just write a stream like StreamWithExceptionHandling extends Stream. Which also accepts an ExceptionHandler and just implements the above behaviour?</p>
  
  <p>Thanks for taking your time to read this one.</p>