|
|
@ -19,9 +19,13 @@ class HomeController extends AbstractController |
|
|
|
]); |
|
|
|
} |
|
|
|
|
|
|
|
public function error($exception, $logger = null): Response |
|
|
|
public function error(Request $request, $exception, $logger = null): Response |
|
|
|
{ |
|
|
|
$this->addFlash('danger', 'Erreur ! ' . $exception->getMessage()); |
|
|
|
$this->addFlash('danger', $exception->getMessage()); |
|
|
|
|
|
|
|
if ($request->headers->has('Referer')) { |
|
|
|
return $this->redirect($request->headers->get('Referer')); |
|
|
|
} |
|
|
|
|
|
|
|
return $this->render('home/error.html.twig', [ |
|
|
|
]); |
|
|
|