src/Leevel/Kernel/Runtime.php
public function report(Exception $e)
    {
        if (method_exists($e, 'report')) {
            return $e->report();
        }

        // @codeCoverageIgnoreStart
        try {
            // 系统核心组件遇到异常，直接抛出异常
            if (!is_object($this->container->make('option'))) {
                echo $this->renderExceptionWithWhoops($e);
                exit();
            }

            $log = $this->container->make(ILog::class);
        } catch (Exception $e) {
            throw $e;
        }
        // @codeCoverageIgnoreEnd

        $log->error(
            $e->getMessage(),
            [
                'exception' => (string) $e,
            ]
        );

        $log->flush();
    }
public function report(Exception $e)
    {
        if (method_exists($e, 'report')) {
            return $e->report();
        }

        // @codeCoverageIgnoreStart
        try {
            // 系统核心组件遇到异常，直接抛出异常
            if (!is_object($this->container->make('option'))) {
                echo $this->renderExceptionWithWhoops($e);
                exit();
            }

            $log = $this->container->make(ILog::class);
        } catch (Exception $e) {
            throw $e;
        }
        // @codeCoverageIgnoreEnd

        $log->error(
            $e->getMessage(),
            [
                'exception' => (string) $e,
            ]
        );

        $log->flush();
    }
异常上报.

@param \Exception $e

@return mixed