public static function getThrowableStack($ex, &$data = [], $offset = 0)
    {
        $data = static::getThrowableData($ex, $offset);

        if (($current = $ex->getPrevious()) !== null)
        {
            static::getThrowableStack($current, $data['prev'], count(static::getTraceElements($ex)));
        }

        return $data;
    }