ExceptionController

class ExceptionController

ExceptionController renders error or exception pages for a given FlattenException.

Methods

__construct(Twig_Environment $twig, $debug)
Response showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null)

Converts an Exception to a Response.

Details

__construct(Twig_Environment $twig, $debug)

Parameters

Twig_Environment $twig
$debug

Response showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null)

Converts an Exception to a 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 The request
FlattenException $exception A FlattenException instance
DebugLoggerInterface $logger A DebugLoggerInterface instance

Return Value

Response

Exceptions

InvalidArgumentException When the exception template does not exist
doc_Symfony
2016-10-28 06:15:34
Comments
Leave a Comment

Please login to continue.