title: How can i simulate a 404 error with Symfony2?
body: <p>so i'm looking for a way to simulate an 404 error, i tried this :   </p>
  
  <pre><code>throw $this-&gt;createNotFoundException();  
  </code></pre>
  
  <p>and this  </p>
  
  <pre><code>return new Response("",404);
  </code></pre>
  
  <p>but none does work.  </p>