title: Why can't we throw exception inside Java 8 stream?
body: <p>E.g:</p>
  
  <pre><code>Person result = persons.stream()
                    .filter(x -&gt; {
                      if ("test".equals(x.getName() ) ) {
                        throw new IOException("not possible inside stream y ?"); //any checked exception
                      }
                      //code here
                    })
  </code></pre>
  
  <p>M looking for reason why it is not being allowed ? Even if method in which code is declared throws IOException</p>