public function convert(\Exception $ex)
    {
        $exceptions = array();

        do {
            $exceptions[] = $this->convertException($ex);
        } while (null !== $ex = $ex->getPrevious());

        return $exceptions;
    }
public function convert(\Exception $ex)
    {
        $exceptions = array();

        do {
            $exceptions[] = $this->convertException($ex);
        } while (null !== $ex = $ex->getPrevious());

        return $exceptions;
    }
public function convert ( \ Exception $ ex ) { $ exceptions = array ( ) ; do { $ exceptions [ ] = $ this -> convertException ( $ ex ) ; } while ( null !== $ ex = $ ex -> getPrevious ( ) ) ; return $ exceptions ; }
Converts an exception to an array.

@param \Exception $ex
@return array
Converts an exception to an array .