title: Symfony Throw custom 404 page inside service
body: <p>I need to throw an Exception inside service </p>
  
  <pre><code>        $isLangExist = $this-&gt;em-&gt;getRepository('TranslationBundle:Language')-&gt;findOneBy(array(
          'locale' =&gt; $this-&gt;request-&gt;getMasterRequest()-&gt;getLocale()
      ));
      if (!$isLangExist) {
          throw new createNotFoundException('you are using unavailable langage');
      }
  </code></pre>
  
  <p>but I got this page is not workinc in prod env</p>
  
  <p>how can i show 404 page with createNotFoundException or any another Exception  type </p>
  
  <p>thanks </p>