Author: jwage
Date: 2008-08-29 21:28:38 +0100 (Fri, 29 Aug 2008)
New Revision: 4863
Modified:
branches/1.0/lib/Doctrine/Query/Abstract.php
Log:
Moving exception to top of function
Modified: branches/1.0/lib/Doctrine/Query/Abstract.php
===================================================================
--- branches/1.0/lib/Doctrine/Query/Abstract.php 2008-08-29 20:26:05 UTC
(rev 4862)
+++ branches/1.0/lib/Doctrine/Query/Abstract.php 2008-08-29 20:28:38 UTC
(rev 4863)
@@ -940,16 +940,16 @@
*/
public function execute($params = array(), $hydrationMode = null)
{
+ if (empty($this->_dqlParts['from']) &&
empty($this->_sqlParts['from'])) {
+ throw new Doctrine_Query_Exception('You must have at least one
component specified in your from.');
+ }
+
$this->_preQuery();
if ($hydrationMode !== null) {
$this->_hydrator->setHydrationMode($hydrationMode);
}
- if (empty($this->_dqlParts['from']) &&
empty($this->_sqlParts['from'])) {
- throw new Doctrine_Query_Exception('You must have at least one
component specified in your from.');
- }
-
$params = $this->getParams($params);
if ($this->_resultCache && $this->_type == self::SELECT) {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---