W3cubDocs

/Symfony 2.7

Symfony\Bundle\TwigBundle\Controller\ExceptionController

class ExceptionController

ExceptionController.

Methods

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

Converts an Exception to a Response.

Response testErrorPageAction(Request $request, int $code)

Displays the error page for arbitrary status codes and formats.

Details

public __construct(Twig_Environment $twig, $debug)

Parameters

Twig_Environment $twig
$debug

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

Converts an Exception to a Response.

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

public Response testErrorPageAction(Request $request, int $code)

Displays the error page for arbitrary status codes and formats.

Parameters

Request $request The request
int $code The HTTP status code to show the error page for.

Return Value

Response

Exceptions

InvalidArgumentException When the error template does not exist

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Bundle/TwigBundle/Controller/ExceptionController.html