title: How to throw an exception using lambda expression
body: <p>I need to throw an exception if array contains a negative number.</p>
  <p>What is best practices to do that using java8 features ?</p>
  <pre><code>Integer array = {11, -10, -20, -30, 10, 20, 30};
  
  array.stream().filter(i -&gt; i &lt; 0) // then throw an exception
  </code></pre>