@@ -169,6 +169,32 @@ To use this feature, you need to have a definition in your
169
169
resource : " @TwigBundle/Resources/config/routing/errors.xml"
170
170
prefix : /_error
171
171
172
+ .. code-block :: xml
173
+
174
+ <!-- app/config/routing_dev.xml -->
175
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
176
+ <routes xmlns =" http://symfony.com/schema/routing"
177
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
178
+ xsi : schemaLocation =" http://symfony.com/schema/routing
179
+ http://symfony.com/schema/routing/routing-1.0.xsd" >
180
+
181
+ <import resource =" @TwigBundle/Resources/config/routing/errors.xml"
182
+ prefix =" /_error" />
183
+ </routes >
184
+
185
+ .. code-block :: php
186
+
187
+ // app/config/routing_dev.php
188
+ use Symfony\Component\Routing\RouteCollection;
189
+
190
+ $collection = new RouteCollection();
191
+ $collection->addCollection(
192
+ $loader->import("@AcmeHelloBundle/Resources/config/routing.php")
193
+ );
194
+ $collection->addPrefix("/error");
195
+
196
+ return $collection;
197
+
172
198
If you're coming from an older version of Symfony, you might need to
173
199
add this to your ``routing_dev.yml `` file. If you're starting from
174
200
scratch, the `Symfony Standard Edition `_ already contains it for you.
@@ -183,15 +209,6 @@ With this route added, you can use URLs like
183
209
to preview the *error * page for a given status code as HTML or for a
184
210
given status code and format.
185
211
186
- .. tip ::
187
-
188
- You should not set ``kernel.debug `` to ``false `` in order to see your
189
- error pages during development. This will also stop
190
- Symfony from recompiling your twig templates, among other things.
191
-
192
- .. _`WebfactoryExceptionsBundle` : https://github.com/webfactory/exceptions-bundle
193
- .. _`Symfony Standard Edition` : https://github.com/symfony/symfony-standard/
194
-
195
212
.. _custom-exception-controller :
196
213
197
214
Replacing the Default ExceptionController
@@ -329,4 +346,6 @@ several) listeners deal with them.
329
346
330
347
Good luck!
331
348
349
+ .. _`WebfactoryExceptionsBundle` : https://github.com/webfactory/exceptions-bundle
350
+ .. _`Symfony Standard Edition` : https://github.com/symfony/symfony-standard/
332
351
.. _`ExceptionListener` : https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
0 commit comments