Commit fcd8ca9d1bf9d6b82a4b2e96b9fc41a66a7a2577
Exists in
master
Merge pull request #82 from ieducativa/validacao-datamapper
Tornado mensagem de nenhum registro encontrado mais amigável.
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
ieducar/lib/CoreExt/DataMapper.php
... | ... | @@ -583,7 +583,8 @@ abstract class CoreExt_DataMapper |
583 | 583 | { |
584 | 584 | $this->_getDbAdapter()->Consulta($this->_getFindStatment($pkey)); |
585 | 585 | if (FALSE === $this->_getDbAdapter()->ProximoRegistro()) { |
586 | - throw new Exception('Nenhum registro encontrado com a(s) chaves(s) informada(s).'); | |
586 | + $table = $this->_tableSchema . '.' . $this->_tableName; | |
587 | + throw new Exception("Nenhum registro encontrado na tabela '$table' com a(s) chaves(s) informada(s): '$pkey'."); | |
587 | 588 | } |
588 | 589 | return $this->_createEntityObject($this->_getDbAdapter()->Tupla()); |
589 | 590 | } | ... | ... |