title: Catching throwable and handling specific exceptions
body: <p>Ok I know catching throwable is not a good idea:</p>
  
  <pre><code>    try {
           // Some code
      } catch(Throwable e) { // Not cool!
          // handle the exception
      }
  </code></pre>
  
  <p>But recently I was reading through an open sourced code and I saw this interesting (at least to me) piece of code:</p>
  
  <pre><code>    try {
          // Some Code
      } catch (Throwable ex){
          response = handleException(ex, resource);
      }
  
      private handleException(Throwable t, String resource) {
          if (t instanceof SQLEXception) {
                 // Some code
          } else if (t instanceof IllegalArgumentException) {
                 //some code
          } //so on and so forth
      }
  </code></pre>
  
  <p>This doesn't seem to be that bad? What is wrong with this approach?</p>