public function exceptionHandler($e, $exit = TRUE) { if (!is_a($e, BASE_EXCEPTION)) { throw new \Exception(sprintf('Report exception requires an instance of %s.', BASE_EXCEPTION)); } $this->exception($e); Debugger::exceptionHandler($e, $exit); }
public function onKernelException(GetResponseForExceptionEvent $event) { $exception = $event->getException(); if (Debugger::isEnabled() && !$this->isIgnoredException($exception)) { if ($this->storeUsernameInServerVariable && $this->tokenStorage !== null) { $this->storeUsernameInServerVariable(); } if (Debugger::$productionMode === true) { Debugger::log($exception, Debugger::ERROR); } else { if (Debugger::$productionMode === false) { ob_start(); Debugger::exceptionHandler($exception, true); $event->setResponse(new Response(ob_get_contents())); ob_clean(); } } } }