Custom Error Patterns for Symfony2 Exceptions

How can I customize Symfony2 templates (e.g. HTTP 404)?

I found some material on symfony.com, but they do not work, there is some way where the default exception templates should be placed, but there are no such directories in my project. It appears that their documentation is out of date.

+4
source share
2 answers

Here:

app |- Resources | | - TwigBundle | | |- view | | | |- Exception | | | | |- error.html.twig | | | | |- error400.html.twig | | | | |- error404.html.twig | | | | |- error500.html.twig | | - view | | |- base.html.twig |- config [...] 

with examples \ vendor \ symfony \ src \ Symfony \ Bundle \ TwigBundle \ Resources \ views \ Exception \ error * .html.twig

+5
source

To overwrite the exception pattern (exception is not an error), this is the real pattern to override.

app> Resources> TwigBundle> views> Exception> exception.html.twig

-1
source

All Articles