title: Is it possible to catch all exceptions except runtime exceptions?
body: <p>I have a statement that throws a lot of checked exceptions. I can add all catch blocks for all of them like this:</p>
  
  <pre><code>try {
      methodThrowingALotOfDifferentExceptions();
  } catch(IOException ex) {
      throw new MyCustomInitializationException("Class Resolver could not be initialized.", ex);
  } catch(ClassCastException ex) {
      throw new MyCustomInitializationException("Class Resolver could not be initialized.", ex);
  } catch...
  </code></pre>
  
  <p>I do not like this because they are all handled same way so there is kind of code duplication and also there is a lot of code to write. Instead could catch <code>Exception</code>:</p>
  
  <pre><code>try {
      methodThrowingALotOfDifferentExceptions();
  } catch(Exception ex) {
      throw new MyCustomInitializationException("Class Resolver could not be initialized.", ex);
  }
  </code></pre>
  
  <p>That would be ok, except I want all runtime exceptions to be thrown away without being caught. Is there any solution to this? I was thinking that some clever generic declaration of the type of exception to be caught might do the trick (or maybe not).</p>