Commit f36bdb29942096118a57fa4005ed315de5aaba78

Authored by Lucas D'Avila
1 parent 5c8a5265
Exists in master

Tornado mensagem de nenhum registro encontrado mais amigável.

* Agora a mensagem informa o nome do registo que não foi encontrado e o id.
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 }
... ...