public function render(\Throwable
$exception): FlattenException
{ $headers =
['Content-Type' => 'text/html; charset='.
$this->charset
];
if (\
is_bool($this->debug
) ?
$this->debug :
($this->debug
)($exception)) { $headers['X-Debug-Exception'
] =
rawurlencode($exception->
getMessage());
$headers['X-Debug-Exception-File'
] =
rawurlencode($exception->
getFile()).':'.
$exception->
getLine();
} $exception = FlattenException::
createWithDataRepresentation($exception, null,
$headers);
return $exception->
setAsString($this->
renderException($exception));
} /**
* Gets the HTML content associated with the given exception.
*/
public function getBody(FlattenException
$exception): string
{ return $this->
renderException($exception, 'views/exception.html.php'
);
} /**
* Gets the stylesheet associated with the given exception.
*/