I just discovered the ParamConverter syntax.

Here is what [the doc](http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html) says : 

> 
> 
> ```
> use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
> use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
> 
> /**
>  * @Route("/blog/{id}")
>  * @ParamConverter("post", class="SensioBlogBundle:Post")
>  */
> public function showAction(Post $post) {
> }
> 
> ```
> 
> Several things happen under the hood:
> 
> 
> * ...
> * **If no Post object is found, a 404 Response is generated**;
> * If a Post object is found, a new post request attribute is defined...
> * ...
> 
> 
> 

I tried this exact thing and it works fine if the id is known but if it is not then I get this Symfony error :

> 
> AppBundle\Entity\MyCustomEntity object not found.
> 
> 
> 

Shouldn't I get a 404 Exception, which redirect me to my custom 404 page ?

Additionnaly, I tried what [this post](https://stackoverflow.com/a/20284189/3888000) suggested, but the condition is not even read, and the same exact "object not found" error is shown again.

Is there any other way to get this working ?