title: Is a finally block without a catch block a java anti-pattern?
body: <p>I just had a pretty painful troubleshooting experience in troubleshooting some code that looked like this:</p>
  
  <pre><code>try {
     doSomeStuff()
     doMore()
  } finally {
     doSomeOtherStuff()
  }
  </code></pre>
  
  <p>The problem was difficult to troubleshoot because doSomeStuff() threw an exception, which in turn caused doSomeOtherStuff() to also throw an exception.  The second exception (thrown by the finally block) was thrown up to my code, but it did not have a handle on the first exception (thrown from doSomeStuff()), which was the real root-cause of the problem.</p>
  
  <p>If the code had said this instead, the problem would have been readily apparent:</p>
  
  <pre><code>try {
      doSomeStuff()
      doMore()
  } catch (Exception e) {
      log.error(e);
  } finally {
     doSomeOtherStuff()
  }
  </code></pre>
  
  <p>So, my question is this:</p>
  
  <p>Is a finally block used without any catch block a well-known java anti-pattern?  (It certainly seems to be a not-readily-apparent subclass of the obviously well-known anti-pattern "Don't gobble exceptions!")</p>