Creates the error Response associated with the given Exception.
\Exception|FlattenException $exception An \Exception instance:
public function createResponse($exception) {
if (!$exception instanceof FlattenException) {
$exception = FlattenException::create($exception);
}
return new Response($this
->decorate($this
->getContent($exception), $this
->getStylesheet($exception)), $exception
->getStatusCode(), $exception
->getHeaders());
}