Commit a4f1fbe8 authored by Fabien Potencier's avatar Fabien Potencier

merged branch jeromemacias/cookbook_debug_error_handler (PR #719)

This PR was merged into the master branch.

Discussion
----------

Introduced new symfony Debug component for error_handler cookbook

Just fix the error_handler cookbook now use the Symfony Debug Component.

Commits
-------

145b48a0 Introduced new symfony Debug component for error_handler cookbook
parents 5a211bd6 145b48a0
...@@ -16,13 +16,13 @@ user to register them. ...@@ -16,13 +16,13 @@ user to register them.
Registering the ErrorHandler Registering the ErrorHandler
---------------------------- ----------------------------
Fortunately, Silex ships with an ``ErrorHandler`` (it's part of the Fortunately, the `Symfony/Debug` package has an `ErrorHandler` that solves this
``HttpKernel`` package) that solves this issue. It converts all errors to issue. It converts all errors to exceptions, and exceptions can be caught by
exceptions, and exceptions can be caught by Silex. Silex.
You register it by calling the static ``register`` method:: You register it by calling the static ``register`` method::
use Symfony\Component\HttpKernel\Debug\ErrorHandler; use Symfony\Component\Debug\ErrorHandler;
ErrorHandler::register(); ErrorHandler::register();
......
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