|
|
|
|
|
|
|
|
->from('nepasrepondre@laclic.fr') |
|
|
->from('nepasrepondre@laclic.fr') |
|
|
->to($mailDebug) |
|
|
->to($mailDebug) |
|
|
->subject( |
|
|
->subject( |
|
|
'[' . $siteName . '] [ERREUR ' . $exception->getStatusCode() . '] ' . $exception->getMessage( |
|
|
|
|
|
) . '' |
|
|
|
|
|
|
|
|
'[' . $siteName . '] [ERREUR ' . $exception->getStatusCode() . '] ' . $exception->getMessage() . '' |
|
|
) |
|
|
) |
|
|
->text(strip_tags($message)) |
|
|
->text(strip_tags($message)) |
|
|
->html($message); |
|
|
->html($message); |
|
|
|
|
|
|
|
|
$mailer->send($email); |
|
|
$mailer->send($email); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($exception->getStatusCode() == 404) { |
|
|
|
|
|
return $this->render('bundles/TwigBundle/Exception/error404.html.twig', [ |
|
|
|
|
|
"code" => $exception->getStatusCode(), |
|
|
|
|
|
"message" => $exception->getMessage() |
|
|
|
|
|
]); |
|
|
|
|
|
} |
|
|
if (str_contains($this->getRequestStack()->getCurrentRequest(), "/admin")) { |
|
|
if (str_contains($this->getRequestStack()->getCurrentRequest(), "/admin")) { |
|
|
return $this->render('@LcSov/exception/error.html.twig', [ |
|
|
return $this->render('@LcSov/exception/error.html.twig', [ |
|
|
"code" => $exception->getStatusCode(), |
|
|
"code" => $exception->getStatusCode(), |