title: Rethrowing exceptions in Java without losing the stack trace
body: <p>In C#, I can use the <code>throw;</code> statement to rethrow an exception while preserving the stack trace:</p>
  
  <pre><code>try
  {
     ...
  }
  catch (Exception e)
  {
     if (e is FooException)
       throw;
  }
  </code></pre>
  
  <p>Is there something like this in Java (<strong>that doesn't lose the original stack trace</strong>)?</p>