// Persist any special HTTP headers that were set on the exception.
if ($exception instanceof HttpExceptionInterface
) { $response->headers->
add($exception->
getHeaders());
} $event->
setResponse($response);
} catch (\Exception
$e) { // If an error happened in the subrequest we can't do much else. Instead,
// just log it. The DefaultExceptionSubscriber will catch the original
// exception and handle it normally.
$error = Error::
decodeException($e);
$this->logger->
log($error['severity_level'
], Error::DEFAULT_ERROR_MESSAGE,
$error);
} }}