Domain/DomainUtil.php
protected static function getFirstException(\Exception $exception)
    {
        if (null !== $exception->getPrevious()) {
            return static::getFirstException($exception->getPrevious());
        }

        return $exception;
    }
protected static function getFirstException(\Exception $exception)
    {
        if (null !== $exception->getPrevious()) {
            return static::getFirstException($exception->getPrevious());
        }

        return $exception;
    }
protected static function getFirstException ( \ Exception $ exception ) { if ( null !== $ exception -> getPrevious ( ) ) { return static :: getFirstException ( $ exception -> getPrevious ( ) ) ; } return $ exception ; }
Get the initial exception.

@param \Exception $exception

@return \Exception
Get the initial exception .