ExceptionListener
class ExceptionListener
ExceptionListener to catch Exception launch
- Catches the Exception,
- Checks if it's a supported one,
- Searches in DB if registered ExceptionChecker
- Updates Response for "redirected" (Data defined in ExceptionChecker) and "excluded" (Route defined in config)
- Throws a "GoneHttpException" for "deleted"
- Throws a "BadRequestHttpException" for "ignored"
- Otherwise adds a message + link to the logger to easily add the ExceptionChecker to the DB
Supported Exceptions
- HttpException
- MethodNotAllowedHttpException
- NotAcceptableHttpException
- NotFoundHttpException
Properties
private ConfigServiceInterface | $configService | Stores ConfigServiceInterface | |
private EntityManagerInterface | $em | Stores EntityManagerInterface | |
private LoggerInterface | $logger | Stores LoggerInterface | |
private RouterInterface | $router | Stores RouterInterface |
Methods
__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, LoggerInterface $logger, RouterInterface $router)
No description
onKernelException(GetResponseForExceptionEvent $event)
Catches the Exception
Details
at line 72
__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, LoggerInterface $logger, RouterInterface $router)
at line 88
onKernelException(GetResponseForExceptionEvent $event)
Catches the Exception