title: Is this pattern for handling IO exceptions in Java correct?
body: <p>In the following code snippet, if ex1 is thrown, will be be caught by the second catch block, or will it be thrown back to the caller of the method?</p>
  
  <p>And if it is thrown back to the caller, and then a second exception occurs in the finally block (ex2), does that mean 2 exceptions will be thrown back to the caller (ex1 and ex2)?</p>
  
  <pre><code>try {
    // write to file
  } catch (IOException ex1) {
    throw ex1;
  } finally {
    try {
      aBufferedWriter.close();
    } catch (IOException ex2) {
      throw ex2;
    }
  }
  </code></pre>