public function ExceptionHandler::createResponse in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/debug/ExceptionHandler.php \Symfony\Component\Debug\ExceptionHandler::createResponse()
Creates the error Response associated with the given Exception.
Parameters
\Exception|FlattenException $exception An \Exception instance:
Return value
1 call to ExceptionHandler::createResponse()
- ExceptionHandler::failSafeHandle in vendor/symfony/ debug/ ExceptionHandler.php 
- Sends a response for the given Exception.
File
- vendor/symfony/ debug/ ExceptionHandler.php, line 206 
Class
- ExceptionHandler
- ExceptionHandler converts an exception to a Response object.
Namespace
Symfony\Component\DebugCode
public function createResponse($exception) {
  if (!$exception instanceof FlattenException) {
    $exception = FlattenException::create($exception);
  }
  return Response::create($this
    ->decorate($this
    ->getContent($exception), $this
    ->getStylesheet($exception)), $exception
    ->getStatusCode(), $exception
    ->getHeaders())
    ->setCharset($this->charset);
}