Changeset 4863

Show
Ignore:
Timestamp:
08/29/08 20:28:38 (10 months ago)
Author:
jwage
Message:

Moving exception to top of function

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/lib/Doctrine/Query/Abstract.php

    r4862 r4863  
    941941    public function execute($params = array(), $hydrationMode = null) 
    942942    { 
     943        if (empty($this->_dqlParts['from']) && empty($this->_sqlParts['from'])) { 
     944            throw new Doctrine_Query_Exception('You must have at least one component specified in your from.'); 
     945        } 
     946 
    943947        $this->_preQuery(); 
    944948 
    945949        if ($hydrationMode !== null) { 
    946950            $this->_hydrator->setHydrationMode($hydrationMode); 
    947         } 
    948  
    949         if (empty($this->_dqlParts['from']) && empty($this->_sqlParts['from'])) { 
    950             throw new Doctrine_Query_Exception('You must have at least one component specified in your from.'); 
    951951        } 
    952952