title: When wrong url is entered, exception error encountered
body: <p>I created a new Symfony project trying to work on following.</p>
  
  <pre><code>friendsofsymfony/rest-bundle
  </code></pre>
  
  <p>Now, at the fos_rest.yml file I added following line of code.</p>
  
  <pre><code>fos_rest:
    format_listener:
      rules:
        - { path: '^/', priorities: ['json'], fallback_format: json }
    view:
      view_response_listener: 'force'
      formats:
        json: true
    exception:
      enabled: true
  </code></pre>
  
  <p>Now if I try to enter the wrong URL then I am getting following error:</p>
  
  <blockquote>
    <p>Argument 1 passed to FOS\RestBundle\Controller\ExceptionController::getStatusCode() must be an instance of Exception, instance of Symfony\Component\ErrorHandler\Exception\FlattenException given, called in C:\xampp\htdocs\symfony_rest\vendor\friendsofsymfony\rest-bundle\Controller\ExceptionController.php on line 68</p>
  </blockquote>
  
  <p>Can anybody help me sort this problem. </p>
  
  <p>Thank You.</p>