mediatekformation

ExceptionController
in package

ExceptionController renders error or exception pages for a given FlattenException.

Tags
author

Fabien Potencier fabien@symfony.com

author

Matthias Pigulla mp@webfactory.de

deprecated

since Symfony 4.4, use Symfony\Component\HttpKernel\Controller\ErrorController instead.

Table of Contents

$debug  : mixed
$twig  : mixed
__construct()  : mixed
showAction()  : Response
Converts an Exception to a Response.
findTemplate()  : string
getAndCleanOutputBuffering()  : string
templateExists()  : mixed

Properties

Methods

__construct()

public __construct(Environment $twig, bool $debug) : mixed
Parameters
$twig : Environment
$debug : bool

Show error (false) or exception (true) pages by default

Return values
mixed

showAction()

Converts an Exception to a Response.

public showAction(Request $request, FlattenException $exception[, DebugLoggerInterface $logger = null ]) : Response

A "showException" request parameter can be used to force display of an error page (when set to false) or the exception page (when true). If it is not present, the "debug" value passed into the constructor will be used.

Parameters
$request : Request
$exception : FlattenException
$logger : DebugLoggerInterface = null
Tags
throws
InvalidArgumentException

When the exception template does not exist

Return values
Response

findTemplate()

protected findTemplate(Request $request, string $format, int $code, bool $showException) : string
Parameters
$request : Request
$format : string
$code : int

An HTTP response status code

$showException : bool
Return values
string

getAndCleanOutputBuffering()

protected getAndCleanOutputBuffering(int $startObLevel) : string
Parameters
$startObLevel : int
Return values
string

templateExists()

protected templateExists(mixed $template) : mixed
Parameters
$template : mixed
Return values
mixed

Search results