/** * {@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; }