/**
  * {@inheritDoc}
  */
 public function handleException(Request $request, HttpException $exception)
 {
     if ($this->isAllowed($exception->getStatusCode())) {
         return $this->kernel->handleException($request, $exception);
     }
     throw $exception;
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function handleException(Request $request, HttpException $exception)
 {
     $response = $this->kernel->handleException($request, $exception);
     $profile = $this->profiler->collect($request, $response, $exception);
     $this->profiler->saveProfile($profile);
     return $response;
 }
 /**
  * {@inheritDoc}
  */
 public function handleException(Request $request, HttpException $exception)
 {
     $this->logger->log($this->getLogLevel($exception), $this->getMessage($exception), ['exception' => $exception]);
     return $this->kernel->handleException($request, $exception);
 }