Commit 145b48a0 authored by Jérôme Macias's avatar Jérôme Macias

Introduced new symfony Debug component for error_handler cookbook

parent c2148890
...@@ -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