code: public function onKernelException(GetResponseForExceptionEvent $event)
      {
          if ($this->isIgnored($event->getException())) {
              return;
          }
  
          if ($this->mailer) {
              $this->mailer->sendException($event->getRequest(), $event->getException());
          }
          if ($this->statsd) {
              $this->statsd->increment("exception");
          }
      }
docs: Exception error handler
  
  @param GetResponseForExceptionEvent $event
  
  @return void