From the documentation:
All of the error templates live inside TwigBundle. To override the
templates, we simply rely on the standard method for overriding
templates that live inside a bundle.
And:
To see the full list of default error templates, see the
Resources/views/Exception directory of the TwigBundle.
Looking at the after-mentioned directory i can find several files. I'm interested in custom templates for 403, 404 and 500 errors, so i created error.html.twig
(parent template) and error403.html.twig
, error404.html.twig
and error500.html.twig
that extends from 'TwigBundle:Exception:error.html.twig'
(overridden by my custom parent template).
Is this correct? What happens if another kind of error or exception is thrown?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…