return SubRequestHandler::
handle($this->kernel,
$subRequest, HttpKernelInterface::SUB_REQUEST, false
);
} catch (\Exception
$e) { // we dispatch the exception event to trigger the logging
// the response that comes back is ignored
if (isset($options['ignore_errors'
]) &&
$options['ignore_errors'
] &&
$this->dispatcher
) { $event =
new ExceptionEvent($this->kernel,
$request, HttpKernelInterface::SUB_REQUEST,
$e);
$this->dispatcher->
dispatch($event, KernelEvents::EXCEPTION
);
} // let's clean up the output buffers that were created by the sub-request
Response::
closeOutputBuffers($level, false
);
if (isset($options['alt'
])) { $alt =
$options['alt'
];
unset($options['alt'
]);
return $this->
render($alt,
$request,
$options);
} if (!
isset($options['ignore_errors'
]) || !
$options['ignore_errors'
]) { throw $e;
}