src/Valkyrja/Debug/ExceptionHandler.php
public function sendExceptionResponse($exception): void
    {
        if (! headers_sent()) {
            if ($exception instanceof HttpException) {
                header(sprintf('HTTP/1.0 %s', $exception->getStatusCode()));

                foreach ($exception->getHeaders() as $name => $value) {
                    header($name . ': ' . $value, false);
                }
            }

            header('Content-Type: text/html; charset=' . $this->charset);
        }

        echo $this->html($this->getContent($exception), $this->getStylesheet());
    }
public function sendExceptionResponse($exception): void
    {
        if (! headers_sent()) {
            if ($exception instanceof HttpException) {
                header(sprintf('HTTP/1.0 %s', $exception->getStatusCode()));

                foreach ($exception->getHeaders() as $name => $value) {
                    header($name . ': ' . $value, false);
                }
            }

            header('Content-Type: text/html; charset=' . $this->charset);
        }

        echo $this->html($this->getContent($exception), $this->getStylesheet());
    }
Send response.

@param \Throwable $exception

@return void