If I run the controller “normally” the (Booking) Controller throws an exception I get my custom 500 error page.
If I render the controller inside another template, like so:
{% render "BookingBundle:Booking:list" %}
then I don’t get anything just blank output.
Is there a way to get the error page to display here with out doing a try catch inside the controller?
When you use the render tag, you can specify some options as the third argument:
The debug mode is activated by passing
trueas the value of the second kernel’s constructor argument. You can see it in the front controller classes:If you don’t want to ignore errors, even in non-debug mode, you can do: