File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -110,3 +110,24 @@ Symfony uses the following algorithm to determine which template to use:
110
110
customized in the same way by creating templates such as
111
111
``exception.html.twig `` for the standard HTML exception page or
112
112
``exception.json.twig `` for the JSON exception page.
113
+
114
+ Testing Error Pages during development
115
+ --------------------------------------
116
+
117
+ The default exception controller,
118
+ ``Symfony\Bundle\TwigBundle\Controller\ExceptionController ``, which is
119
+ part of the TwigBundle will show
120
+ *exception * pages when you're in ``kernel.debug `` mode and *error *
121
+ pages otherwise. Thus, your end users will typically see the *error *
122
+ pages.
123
+
124
+ But setting ``kernel.debug `` to ``false `` during development to write
125
+ or test your custom error pages is impractical as it stops Symfony2 from
126
+ recompiling the Twig templates, among other things.
127
+
128
+ To help you with that, `webfactory/exceptions-bundle `_ contains a
129
+ simple test controller that you can use to trigger custom exceptions. At
130
+ the same time, it will make the `ExceptionController ` display the
131
+ corresponding *error * pages also in ``kernel.debug `` mode.
132
+
133
+ .. _`webfactory/exceptions-bundle` : https://github.com/webfactory/exceptions-bundle
You can’t perform that action at this time.
0 commit comments