title: Java unreachable catch block compiler error
body: <p>Why in Java can we catch an <code>Exception</code> even if it is not thrown, but we can't catch it's subclass (except for "unchecked" <code>RuntimeException</code>s and it subclasses). Example code:</p>
  
  <pre><code>class Test {
      public static void main(String[] args) {
          try {
              // do nothing
          } catch (Exception e) {
              // OK           
          }
  
          try {
              // do nothing
          } catch (IOException e) {
                 // COMPILER ERROR: Unreachable catch block for IOException.
                 //This exception is never thrown from the try statement body
          }       
      }
  }
  </code></pre>
  
  <p>Any ideas?</p>