class ExceptionListener implements EventSubscriberInterface
ExceptionListener.
| protected | $controller | ||
| protected | $logger | ||
| protected | $debug |
| __construct($controller, LoggerInterface $logger = null, $debug = false) | ||
| logKernelException(GetResponseForExceptionEvent $event) | ||
| onKernelException(GetResponseForExceptionEvent $event) | ||
| static array | getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. | |
| logException(Exception $exception, string $message) Logs an exception. | ||
| Request | duplicateRequest(Exception $exception, Request $request) Clones the request for the exception. |
| $controller | ||
| LoggerInterface | $logger | |
| $debug |
| GetResponseForExceptionEvent | $event |
| GetResponseForExceptionEvent | $event |
Returns an array of event names this subscriber wants to listen to.
The array keys are event names and the value can be:
For instance:
| array | The event names to listen to |
Logs an exception.
| Exception | $exception | The \Exception instance |
| string | $message | The error message to log |
Clones the request for the exception.
| Exception | $exception | The thrown exception |
| Request | $request | The original request |
| Request | $request The cloned request |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/EventListener/ExceptionListener.html