/** * @static * */ public static function shutdown() { $error = error_get_last(); if (isset($error)) { SendErrorsToMail::byException(new \ErrorException($error['message'], $error['type'], null, $error['file'], $error['line'])); } }
public function onKernelException(GetResponseEvent $event) { SendErrorsToMail::byException($event->getException()); }