ExceptionHandler deprecated
class ExceptionHandler extends ExceptionHandler
deprecated
ExceptionHandler converts an exception to a Response object.
Methods
No description
Registers the exception handler.
Sets the format for links to source files.
Sends the error associated with the given Exception as a plain PHP response.
Creates the error Response associated with the given Exception.
Gets the full HTML content associated with the given exception.
Details
in ExceptionHandler at line line 39
__construct($debug = true, $charset = null, $fileLinkFormat = null)
in ExceptionHandler at line line 63
static ExceptionHandler
register(bool $debug = true, string|null $charset = null, string|null $fileLinkFormat = null)
Registers the exception handler.
in ExceptionHandler at line line 83
callable|null
setHandler(callable $handler)
Sets a user exception handler.
in ExceptionHandler at line line 101
string
setFileLinkFormat(string $format)
Sets the format for links to source files.
in ExceptionHandler at line line 117
handle(Exception $exception)
Sends a response for the given Exception.
To be as fail-safe as possible, the exception is first handled by our simple exception handler, then by the user exception handler. The latter takes precedence and any output from the former is cancelled, if and only if nothing bad happens in this handling path.
in ExceptionHandler at line line 185
sendPhpResponse(Exception|FlattenException $exception)
Sends the error associated with the given Exception as a plain PHP response.
This method uses plain PHP functions like header() and echo to output the response.
in ExceptionHandler at line line 211
Response
createResponse(Exception|FlattenException $exception)
deprecated
deprecated
Creates the error Response associated with the given Exception.
in ExceptionHandler at line line 229
string
getHtml(Exception|FlattenException $exception)
Gets the full HTML content associated with the given exception.
in ExceptionHandler at line line 245
string
getContent(FlattenException $exception)
Gets the HTML content associated with the given exception.
in ExceptionHandler at line line 313
string
getStylesheet(FlattenException $exception)
Gets the stylesheet associated with the given exception.