src/EventListener/LoggingExceptionListener.php
public function onKernelException(GetResponseForExceptionEvent $event): void
    {
        $this->originListener->onKernelException($event);

        if (!$event->hasResponse()) {
            // The origin listener not processed.
            return;
        }

        $this->logException($event->getException());
    }
public function onKernelException(GetResponseForExceptionEvent $event): void
    {
        $this->originListener->onKernelException($event);

        if (!$event->hasResponse()) {
            // The origin listener not processed.
            return;
        }

        $this->logException($event->getException());
    }
public function onKernelException ( GetResponseForExceptionEvent $ event ) : void { $ this -> originListener -> onKernelException ( $ event ) ; if ( ! $ event -> hasResponse ( ) ) { // The origin listener not processed. return ; } $ this -> logException ( $ event -> getException ( ) ) ; }
Handle the exception and log message.

@param GetResponseForExceptionEvent $event
Handle the exception and log message .