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;
    }
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;
    }
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 ; }
Return throwable stack in recursive array format.

@param \Error|\Exception $ex
@param string[] &$data
@param int $offset
@return mixed
Return throwable stack in recursive array format .