Commit 7a222ce5 authored by Igor Wiedler's avatar Igor Wiedler

Add note on how to handle fatal errors, as per mailing list

parent d8776876
......@@ -29,8 +29,19 @@ You register it by calling the static ``register`` method::
It is recommended that you do this in your front controller, i.e.
``web/index.php``.
.. note::
Handling fatal errors
---------------------
The ``ErrorHandler`` has nothing to do with the ``ExceptionHandler``. The
``ExceptionHandler`` is responsible for displaying caught exceptions
nicely.
To handle fatal errors, you can additionally register a global
``ExceptionHandler``::
use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
ExceptionHandler::register();
In production you may want to disable the debug output by passing ``false`` as
the ``$debug`` argument::
use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
ExceptionHandler::register(false);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment