>From symfony-reload.com doc:

1 public function indexAction()
2 {
3   $product = // retrieve the object from database
4    if (!$product) {
5       throw new NotFoundHttpException('The product does not
exist.');
6    }
7
8    return $this->render(...);
9 }

The 3 line generate 500 Internal Server Error - Doctrine\ORM
\NoResultException before than go to line 4 with exception
NotFoundHttpException

Doctrine produce itself exception, how to redirect doctrine exception
to symfony2 built-in NotFound exception?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to