diff --git a/cookbook/controller/error_pages.rst b/cookbook/controller/error_pages.rst index fed6f2970c3..eeb20da4afe 100644 --- a/cookbook/controller/error_pages.rst +++ b/cookbook/controller/error_pages.rst @@ -233,7 +233,7 @@ In that case, you might want to override one or both of the ``showAction()`` and # app/config/services.yml services: app.exception_controller: - class: AppBundle\CustomExceptionController + class: AppBundle\Controller\CustomExceptionController arguments: ['@twig', '%kernel.debug%'] .. code-block:: xml @@ -264,6 +264,7 @@ In that case, you might want to override one or both of the ``showAction()`` and new Reference('twig'), '%kernel.debug%' )); + $container->setDefinition('app.exception_controller', $definition); And then configure ``twig.exception_controller`` using the controller as services syntax (e.g. ``app.exception_controller:showAction``).