title: LARAVEL -> Why try catch not work in Laravel?
body: <p>I have code in RouteServiceProvider:</p>
  
  <pre><code>$router-&gt;bind('user', function ($value) {
      try{
          throw (new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException);
      }catch(Exception $e){
          exit('nott');
      }
  });
  </code></pre>
  
  <p>and I don not geting output </p>
  
  <pre><code>nott
  </code></pre>
  
  <p>I am getting </p>
  
  <pre><code>Sorry, the page you are looking for could not be found.
  NotFoundHttpException in RouteServiceProvider.php line 75:
  ...
  </code></pre>
  
  <p>EDITED:
  This works:</p>
  
  <pre><code>$router-&gt;bind('user', function ($value) {
      try{
          throw (new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException);
      }catch(\Symfony\Component\HttpKernel\Exception\NotFoundHttpException $e){
          exit('addd');
      }
  });
  </code></pre>
  
  <p>But this not works:</p>
  
  <pre><code>$router-&gt;bind('user', function ($value) {
      try{
          return (new User)-&gt;findOrFail(122);
      }catch(\Symfony\Component\HttpKernel\Exception\NotFoundHttpException $e){
          exit('addd');
      }
  });
  </code></pre>