title: Symfony2: how to catch a DataTransformer exception?
body: <p>I have a datatransformer in symfony 2:</p>
  
  <pre><code>namespace Techforge\ApartmentBundle\Form\DataTransformer;
  
  use Symfony\Component\Form\Exception\TransformationFailedException;
  use Symfony\Component\Form\DataTransformerInterface;
  use Doctrine\Common\Persistence\ObjectManager;
  
  class SearchboxToCityTransformer implements DataTransformerInterface {
  
  
  public function reverseTransform($string)
  {
      //...
      if(!$city)
          throw new TransformationFailedException(sprintf('City not found.'));
  }
  //...
  </code></pre>
  
  <p>I can't figure out how to catch this exception in my controller.</p>
  
  <p>I thought it was going to be thrown upon a form bind:</p>
  
  <pre><code>$form-&gt;bindRequest($request);
  </code></pre>
  
  <p>But that doesn't appear to be the case (I tested this out, and also tested out other parts in my controller).</p>
  
  <p>Also, I'm pretty sure that I triggered the exception because the field didn't appear in the parameter bag (nothing was returned from the reverseTrasnform() function.)</p>
  
  <p>Anyone has any ideas?</p>