Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
7a222ce5
Commit
7a222ce5
authored
Jun 24, 2013
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note on how to handle fatal errors, as per mailing list
parent
d8776876
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
doc/cookbook/error_handler.rst
doc/cookbook/error_handler.rst
+15
-4
No files found.
doc/cookbook/error_handler.rst
View file @
7a222ce5
...
@@ -29,8 +29,19 @@ You register it by calling the static ``register`` method::
...
@@ -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.
It is recommended that you do this in your front controller, i.e.
``web/index.php``.
``web/index.php``.
.. note::
Handling fatal errors
---------------------
The ``ErrorHandler`` has nothing to do with the ``ExceptionHandler``. The
To handle fatal errors, you can additionally register a global
``ExceptionHandler`` is responsible for displaying caught exceptions
``ExceptionHandler``::
nicely.
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);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment