public function getExceptionBacktrace(\Throwable $e)
    {
        $backtrace[] = [
            'line' => $e->getLine(),
            'file' => $e->getFile(),
            'code' => $e->getCode(),
            'message' => $e->getMessage(),
        ];

        if ($e->getPrevious()) {
            return array_merge(
                $backtrace,
                $this->getExceptionBacktrace($e->getPrevious())
            );
        }

        return $backtrace;
    }