src/Leevel/Kernel/Runtime.php
public function rendorWithHttpExceptionView(Exception $e): IResponse
    {
        $filepath = $this->getHttpExceptionView($e);

        if (file_exists($filepath)) {
            $vars = $this->getExceptionVars($e);

            $content = $this->renderWithFile($filepath, $vars);

            return new Response($content,
                $e->getStatusCode(),
                $e->getHeaders()
            );
        }

        return $this->convertExceptionToResponse($e);
    }
public function rendorWithHttpExceptionView(Exception $e): IResponse
    {
        $filepath = $this->getHttpExceptionView($e);

        if (file_exists($filepath)) {
            $vars = $this->getExceptionVars($e);

            $content = $this->renderWithFile($filepath, $vars);

            return new Response($content,
                $e->getStatusCode(),
                $e->getHeaders()
            );
        }

        return $this->convertExceptionToResponse($e);
    }
尝试返回 HTTP 异常响应.

@param \Exception $e

@return \Leevel\Http\IResponse