Ver código fonte

ZF-11766: Zend_Db: More descriptive exception message when table has no primary key

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24958 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan 13 anos atrás
pai
commit
08d52dd728
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      library/Zend/Db/Table/Abstract.php

+ 1 - 1
library/Zend/Db/Table/Abstract.php

@@ -886,7 +886,7 @@ abstract class Zend_Db_Table_Abstract
             // then throw an exception.
             if (empty($this->_primary)) {
                 require_once 'Zend/Db/Table/Exception.php';
-                throw new Zend_Db_Table_Exception('A table must have a primary key, but none was found');
+                throw new Zend_Db_Table_Exception("A table must have a primary key, but none was found for table '{$this->_name}'");
             }
         } else if (!is_array($this->_primary)) {
             $this->_primary = array(1 => $this->_primary);