Symfony\Component\Debug\ExceptionHandler
ExceptionHandler converts an exception to a Response object.
It is mostly useful in debug mode to replace the default PHP/XDebug
output with something prettier and more useful.
As this class is mainly used during Kernel boot, where nothing is yet
available, the Response content is always HTML.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class ExceptionHandler
{
- // methods
- public void __construct()
- public static ExceptionHandler register()
- public void handle()
- public void sendPhpResponse()
- public Response createResponse()
- public string getContent()
- public string getStylesheet()
- private void decorate()
- private void abbrClass()
- private string formatArgs()
Hierarchy
Members
private
- $charset
- $debug
Methods
private
- abbrClass()
- decorate()
- formatArgs() — Formats an array as a string.
public
- __construct()
- createResponse() — Creates the error Response associated with the given Exception.
- getContent() — Gets the HTML content associated with the given exception.
- getStylesheet() — Gets the stylesheet associated with the given exception.
- handle() — Sends a response for the given Exception.
- register() — Registers the exception handler.
- sendPhpResponse() — Sends the error associated with the given Exception as a plain PHP response.