title: Catch all exceptions and send them by e-mail
body: <p>In my app I want to catch all types of exceptions and send reports by e-mail. For that I'm using global try catch block. But now I need to recognize exception by type. How can I do it?</p>
  
  <pre><code>try{
  ...
  }
  catch (Exception e){
  //Here I need to recognize exception by type
  send(Error);
  }
  </code></pre>