Skip to content

Commit b243534

Browse files
committed
Minor tweaks
1 parent 891b677 commit b243534

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

controller/error_pages.rst

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ depending on your needs:
3333
#. If you just want to change the contents and styles of the error pages to match
3434
the rest of your application, :ref:`override the default error templates <use-default-error-controller>`;
3535

36-
#. If you want to change the contents of non-HTML error output, :ref:`create a new normalizer <overriding-non-html-error-output>`;
36+
#. If you want to change the contents of non-HTML error output,
37+
:ref:`create a new normalizer <overriding-non-html-error-output>`;
3738

3839
#. If you also want to tweak the logic used by Symfony to generate error pages,
3940
:ref:`override the default error controller <custom-error-controller>`;
@@ -47,9 +48,9 @@ depending on your needs:
4748
Overriding the Default Error Templates
4849
--------------------------------------
4950

50-
You can use the built-in Twig error renderer to easily override the default error templates.
51-
Both the TwigBundle and TwigBridge need to be installed for this.
52-
Run this command to ensure both are installed:
51+
You can use the built-in Twig error renderer to override the default error
52+
templates. Both the TwigBundle and TwigBridge need to be installed for this. Run
53+
this command to ensure both are installed:
5354

5455
.. code-block:: terminal
5556
@@ -191,10 +192,14 @@ To override non-HTML error output, the Serializer component needs to be installe
191192
192193
$ composer require serializer
193194
194-
The Serializer component has a built-in ``FlattenException`` normalizer (``ProblemNormalizer``) and JSON/XML/CSV/YAML
195-
encoders by default. That means that if an exception were to be thrown in your application, Symfony can output it in
196-
a format supported by one of the encoders. If you want to change how the output is structured, all you have to do
197-
is create a new Normalizer that supports the ``FlattenException`` input::
195+
The Serializer component has a built-in ``FlattenException`` normalizer
196+
(``ProblemNormalizer``) and JSON/XML/CSV/YAML encoders. When your application
197+
throws an exception, Symfony can output it in one of those formats. If you want
198+
to change the output contents, create a new Normalizer that supports the
199+
``FlattenException`` input::
200+
201+
# src/App/Serializer/MyCustomProblemNormalizer.php
202+
namespace App\Serializer;
198203

199204
class MyCustomProblemNormalizer implements NormalizerInterface
200205
{

reference/configuration/framework.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,11 @@ error_controller
608608

609609
The ``error_controller`` option was introduced in Symfony 4.4.
610610

611-
This is the controller that is activated after an exception is thrown anywhere
612-
in your application. The default controller
611+
This is the controller that is called when an exception is thrown anywhere in
612+
your application. The default controller
613613
(:class:`Symfony\\Component\\HttpKernel\\Controller\\ErrorController`)
614-
is what's responsible for rendering specific templates under different error
615-
conditions (see :doc:`/controller/error_pages`).
614+
renders specific templates under different error conditions (see
615+
:doc:`/controller/error_pages`).
616616

617617
esi
618618
~~~

0 commit comments

Comments
 (0)