@@ -228,7 +228,7 @@ example, we gonna override the showAction method::
228
228
# src/AppBundle/Controller/ExceptionController.php
229
229
230
230
namespace AppBundle\Controller;
231
-
231
+
232
232
use Symfony\Component\HttpFoundation\Request;
233
233
use Symfony\Component\HttpKernel\Exception\FlattenException;
234
234
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
@@ -240,10 +240,10 @@ example, we gonna override the showAction method::
240
240
{
241
241
$currentContent = $this->getAndCleanOutputBuffering($request->headers->get('X-Php-Ob-Level', -1));
242
242
$showException = $request->attributes->get('showException', $this->debug); // As opposed to an additional parameter, this maintains BC
243
-
243
+
244
244
// $code = $exception->getStatusCode();
245
245
$code = 500; // Route exceptions will throw status code 500
246
-
246
+
247
247
return new Response($this->twig->render(
248
248
(string) $this->findTemplate($request, $request->getRequestFormat(), $code, $showException),
249
249
array(
@@ -275,7 +275,7 @@ To finally enable the custom exception controller, set the :ref:`twig.exception_
275
275
276
276
# app/config/config.yml
277
277
twig :
278
- exception_controller : appbundle .twig.controller.exception :showAction
278
+ exception_controller : app .twig.exception_controller :showAction
279
279
280
280
.. code-block :: xml
281
281
@@ -290,15 +290,15 @@ To finally enable the custom exception controller, set the :ref:`twig.exception_
290
290
http://symfony.com/schema/dic/twig/twig-1.0.xsd" >
291
291
292
292
<twig : config >
293
- <twig : exception-controller >appbundle .twig.controller.exception :showAction</twig : exception-controller >
293
+ <twig : exception-controller >app .twig.exception_controller :showAction</twig : exception-controller >
294
294
</twig : config >
295
295
</container >
296
296
297
297
.. code-block :: php
298
298
299
299
// app/config/config.php
300
300
$container->loadFromExtension('twig', array(
301
- 'exception_controller' => 'appbundle .twig.controller.exception :showAction',
301
+ 'exception_controller' => 'app .twig.exception_controller :showAction',
302
302
// ...
303
303
));
304
304
0 commit comments