src/Leevel/Kernel/Bootstrap/RegisterRuntime.php
public function setExceptionHandler(Throwable $e): void
    {
        if (!$e instanceof Exception) {
            $e = new ErrorException(
                $e->getMessage(),
                $e->getCode(),
                E_ERROR,
                $e->getFile(),
                $e->getLine(),
                $e->getPrevious()
            );
        }

        try {
            $this->getRuntime()->report($e);
            // @codeCoverageIgnoreStart
        } catch (Exception $e) {
        }
        // @codeCoverageIgnoreEnd

        if ($this->app->console()) {
            $this->renderConsoleResponse($e);
        } else {
            $this->renderHttpResponse($e);
        }
    }
public function setExceptionHandler(Throwable $e): void
    {
        if (!$e instanceof Exception) {
            $e = new ErrorException(
                $e->getMessage(),
                $e->getCode(),
                E_ERROR,
                $e->getFile(),
                $e->getLine(),
                $e->getPrevious()
            );
        }

        try {
            $this->getRuntime()->report($e);
            // @codeCoverageIgnoreStart
        } catch (Exception $e) {
        }
        // @codeCoverageIgnoreEnd

        if ($this->app->console()) {
            $this->renderConsoleResponse($e);
        } else {
            $this->renderHttpResponse($e);
        }
    }
响应异常.

@param \Throwable $e