|
- <?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 ($this->getRequestStack()->getCurrentRequest()->getPathInfo() == "/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()
- ]);
- }
- }
- }
|