3 namespace Rapsys\AirBundle\Controller
;
5 use Symfony\Component\HttpFoundation\Request
;
6 use Symfony\Component\HttpFoundation\Response
;
7 #use Symfony\Component\Security\Core\Exception\AccessDeniedException;
8 #use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface;
9 #use Symfony\Component\DependencyInjection\ContainerInterface;
10 #use Symfony\Component\Routing\RouterInterface;
11 #use Symfony\Component\Translation\TranslatorInterface;
12 #use Twig\Environment;
14 #use Symfony\Component\Debug\Exception\FlattenException;
15 use Symfony\Component\ErrorHandler\Exception\FlattenException
;
17 class ErrorController
extends DefaultController
{
21 public function preview(Request
$request, FlattenException
$exception) {
23 $section = $exception->getStatusCode().' '.$this->translator
->trans($exception->getStatusText());
26 $title = $section.' - '.$this->translator
->trans($this->config
['site']['title']);
29 $message = $exception->getMessage();
32 $trace = $exception->getAsString();
36 '@RapsysAir/error.html.twig',
37 ['title' => $title, 'section' => $section, 'message' => $message, 'trace' => $trace]+
$this->context