|
- <?php
-
- namespace Lc\SovBundle\Controller;
-
- use Throwable;
- use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
-
- class ErrorController extends AbstractController
- {
-
- public function show(Throwable $exception, DebugLoggerInterface $logger = null)
- {
- if (str_contains($this->getRequestStack()->getCurrentRequest(), "/admin")) {
- return $this->render('@LcSov/exception/error.html.twig', [
- "code" => $exception->getCode(),
- "message" => $exception->getMessage()
- ]);
- } else {
- return $this->render('bundles/TwigBundle/Exception/error.html.twig', [
- "code" => $exception->getCode(),
- "message" => $exception->getMessage()
- ]);
- }
- }
- }
|