@@ -22,14 +22,9 @@ Installation
2222Usage
2323-----
2424
25- The ErrorHandler component provides several tools to help you debug PHP code:
26-
27- * An **error handler ** that turns PHP errors into exceptions;
28- * An **exception handler ** that turns uncaught PHP exceptions into nice PHP responses;
29- * A **debug class loader ** that provides better errors when a class is not found.
30-
25+ The ErrorHandler component provides several tools to help you debug PHP code.
3126Call this method (e.g. in your :ref: `front controller <architecture-front-controller >`)
32- to enable all these features in your application::
27+ to enable all of them in your application::
3328
3429 // public/index.php
3530 use Symfony\Component\ErrorHandler\Debug;
@@ -52,9 +47,10 @@ Turning PHP Errors into Exceptions
5247----------------------------------
5348
5449The :class: `Symfony\\ Component\\ ErrorHandler\\ ErrorHandler ` class catches PHP
55- errors and turns them into PHP's :phpclass: `ErrorException ` objects, except for
56- fatal PHP errors, which are turned into Symfony's
57- :class: `Symfony\\ Component\\ ErrorHandler\\ Exception\\ FatalErrorException ` objects.
50+ errors and uncaught PHP exceptions and turns them into PHP's
51+ :phpclass: `ErrorException ` objects, except for fatal PHP errors, which are
52+ turned into Symfony's :class: `Symfony\\ Component\\ ErrorHandler\\ Exception\\ FatalErrorException `
53+ objects.
5854
5955If the application uses the FrameworkBundle, this error handler is enabled by
6056default in the :ref: `production environment <configuration-environments >`
@@ -120,26 +116,6 @@ wrap several function calls inside an anonymous function::
120116 return $data;
121117 });
122118
123- Debugging Uncaught PHP Exceptions
124- ---------------------------------
125-
126- The :class: `Symfony\\ Component\\ ErrorHandler\\ ExceptionHandler ` class catches
127- uncaught PHP exceptions and turns them into a nice response, so you can debug
128- them. It is useful in :ref: `debug mode <debug-mode >` to replace the default
129- PHP/XDebug output with something prettier and more useful.
130-
131- If the :doc: `HttpFoundation component </components/http_foundation >` is
132- available, the handler returns a Symfony's
133- :class: `Symfony\\ Component\\ HttpFoundation\\ Response ` object. Otherwise, it returns
134- a generic PHP response.
135-
136- Use the following code (e.g. in your :ref: `front controller <architecture-front-controller >`)
137- to enable this exception handler::
138-
139- use Symfony\Component\ErrorHandler\ExceptionHandler;
140-
141- ExceptionHandler::register();
142-
143119.. _component-debug-class-loader :
144120
145121Class Loading Debugger
0 commit comments