@@ -3,9 +3,9 @@ How to customize Error Pages
33
44When any exception is thrown in Symfony2, the exception is caught inside the
55``Kernel `` class and eventually forwarded to a special controller,
6- ``FrameworkBundle :Exception:show `` for handling. This controller, which lives
7- inside the core ``FrameworkBundle ``, determines which error template to
8- display and the status code that should be set for the given exception.
6+ ``TwigBundle :Exception:show `` for handling. This controller, which lives
7+ inside the core ``TwigBundle ``, determines which error template to display and
8+ the status code that should be set for the given exception.
99
1010.. tip ::
1111
@@ -14,14 +14,14 @@ display and the status code that should be set for the given exception.
1414 which allows complete control over exception handling. For more
1515 information, see :ref: `kernel-kernel.exception `.
1616
17- All of the error templates live inside ``FrameworkBundle ``. To override the
17+ All of the error templates live inside ``TwigBundle ``. To override the
1818templates, we simply rely on the standard method for overriding templates that
1919live inside a bundle. For more information, see
2020:ref: `overriding-bundle-templates `.
2121
2222For example, to override the default error template that's shown to the
2323end-user, create a new template located at
24- ``app/Resources/FrameworkBundle /views/Exception/error.html.twig ``:
24+ ``app/Resources/TwigBundle /views/Exception/error.html.twig ``:
2525
2626.. code-block :: html+jinja
2727
@@ -47,8 +47,8 @@ page for many of the most common response formats, including JSON
4747(``error.json.twig ``), XML, (``error.xml.twig ``), and even Javascript
4848(``error.js.twig ``), to name a few. To override any of these templates, just
4949create a new file with the same name in the
50- ``app/Resources/FrameworkBundle /views/Exception `` directory. This is the
51- standard way of overriding any template that lives inside a bundle.
50+ ``app/Resources/TwigBundle /views/Exception `` directory. This is the standard
51+ way of overriding any template that lives inside a bundle.
5252
5353.. _cookbook-error-pages-by-status-code :
5454
@@ -57,8 +57,8 @@ Customizing the 404 Page and other Error Pages
5757
5858You can also customize specific error templates according to the HTTP status
5959code. For instance, create a
60- ``app/Resources/FrameworkBundle /views/Exception/error404.html.twig `` template
61- to display a special page for 404 (page not found) errors.
60+ ``app/Resources/TwigBundle /views/Exception/error404.html.twig `` template to
61+ display a special page for 404 (page not found) errors.
6262
6363Symfony uses the following algorithm to determine which template to use:
6464
@@ -74,11 +74,11 @@ Symfony uses the following algorithm to determine which template to use:
7474.. tip ::
7575
7676 To see the full list of default error templates, see the
77- ``Resources/views/Exception `` directory of the ``FrameworkBundle ``. In a
78- standard Symfony2 installation, the ``FrameworkBundle `` can be found at
79- ``vendor/symfony/src/Symfony/Bundle/FrameworkBundle ``. Often, the easiest
80- way to customize an error page is to copy it from the ``FrameworkBundle ``
81- into ``app/Resources/FrameworkBundle /views/Exception `` and then modify it.
77+ ``Resources/views/Exception `` directory of the ``TwigBundle ``. In a
78+ standard Symfony2 installation, the ``TwigBundle `` can be found at
79+ ``vendor/symfony/src/Symfony/Bundle/TwigBundle ``. Often, the easiest way
80+ to customize an error page is to copy it from the ``TwigBundle `` into
81+ ``app/Resources/TwigBundle /views/Exception `` and then modify it.
8282
8383.. note ::
8484
0 commit comments