// Don't do anything if the Zend_Db_Profiler is not enabled.
if (!
$this->_enabled
) { return self::IGNORED;
} // Check for a valid query handle.
if (!
isset($this->_queryProfiles
[$queryId])) { /**
* @see Zend_Db_Profiler_Exception
*/
throw new Zend_Db_Profiler_Exception("Profiler has no query with handle '
$queryId'."
);
} $qp =
$this->_queryProfiles
[$queryId];
// Ensure that the query profile has not already ended
if ($qp->
hasEnded()) { /**
* @see Zend_Db_Profiler_Exception
*/
throw new Zend_Db_Profiler_Exception("Query with profiler handle '
$queryId' has already ended."
);
}