title: Throw new exception in Ternary condition
body: <p>I have this lines of code:</p>
  
  <pre><code>List&lt;Long&gt; list = new ArrayList&lt;&gt;();
  
  if (n &lt; 0) throw new RuntimeException();
  
  if (n == 0) return list;
  </code></pre>
  
  <p>I want to use <code>Ternary condition</code> :</p>
  
  <pre><code>return (n &lt; 0) ? (throw new RuntimeException()) : list;
  </code></pre>
  
  <p>But i have compile time exception.</p>