src/Controller/ErrorController.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\ErrorHandler\Exception\FlattenException;
  5. use Symfony\Component\HttpFoundation\JsonResponse;
  6. use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
  7. class ErrorController extends AbstractController
  8. {
  9.     public function show(FlattenException $exceptionDebugLoggerInterface $logger null)
  10.     {
  11.         return new JsonResponse([
  12.             'message' => $exception->getMessage()
  13.         ]);
  14.     }
  15. }