in view:

{{ render(controller('Bundle:Comment:list')) }}

in Comment::listAction():

throw $this->createNotFoundException();


CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: 
"An exception has been thrown during the rendering of a template ("Not Found") 
in "Bundle:Article:show.html.twig" at line 5." 
at /vendor/twig/twig/lib/Twig/Template.php line 294 

if I throw that same exception from Article:showAction() it handles ok automatically.

Is there a way to setup standard "Not found" exception handling thrown from inside of view? Or suggest how to code that without exception.

Related posts

Recent Viewed