@@ -169,6 +169,32 @@ To use this feature, you need to have a definition in your
169169resource :" @TwigBundle/Resources/config/routing/errors.xml"
170170prefix :/_error
171171
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+
172198 If you're coming from an older version of Symfony, you might need to
173199add this to your ``routing_dev.yml `` file. If you're starting from
174200scratch, the `Symfony Standard Edition `_ already contains it for you.
@@ -183,15 +209,6 @@ With this route added, you can use URLs like
183209 to preview the *error * page for a given status code as HTML or for a
184210given status code and format.
185211
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-
195212.. _custom-exception-controller :
196213
197214Replacing the Default ExceptionController
@@ -329,4 +346,6 @@ several) listeners deal with them.
329346
330347Good luck!
331348
349+ .. _`WebfactoryExceptionsBundle` :https://github.com/webfactory/exceptions-bundle
350+ .. _`Symfony Standard Edition` :https://github.com/symfony/symfony-standard/
332351.. _`ExceptionListener` :https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php