title: Catch swiftmailer exception in Symfony2 dev env controller
body: <p>Im not sure why Im not catching exceptions from Swiftmailer in my controller. What am I doing wrong, or missing?</p>
  
  <p>In a controller I have:</p>
  
  <pre><code>try {
      $this-&gt;get('mailer')-&gt;send($email);
  }
  catch (\Swift_TransportException $e) {
      $result = array(
          false, 
          'There was a problem sending email: ' . $e-&gt;getMessage()
      );
  }
  </code></pre>
  
  <p>It seems to get caught by Symfony before it gets to my code, so instead of being able to handle the error myself I get the standard 500 page with 
  <code>Swift_TransportException: Connection could not be established</code></p>
  
  <p>If the email can't be sent there is no need for the application to halt as the email isn't critical - I just want to issue a notice.</p>
  
  <p>Maybe there's a way to disable Symfonys catching of certain exceptions or for certain Controllers?</p>