2
0
forked from Wavyzz/dolibarr

error management

This commit is contained in:
Laurent Destailleur
2019-06-21 09:38:26 +02:00
parent b111636ed0
commit b0c76f48e1
2 changed files with 3 additions and 1 deletions

View File

@@ -346,6 +346,7 @@ class Entrepot extends CommonObject
{
$error++;
$this->errors[] = $this->db->lasterror();
dol_syslog(get_class($this)."::delete Error ".$this->db->lasterror(), LOG_ERR);
}
}
@@ -358,6 +359,7 @@ class Entrepot extends CommonObject
{
$error++;
$this->errors[] = $this->db->lasterror();
dol_syslog(get_class($this)."::delete Error ".$this->db->lasterror(), LOG_ERR);
}
}

View File

@@ -238,7 +238,7 @@ class EntrepotTest extends PHPUnit_Framework_TestCase
$result=$localobject->delete($user);
print __METHOD__." id=".$id." result=".$result."\n";
$this->assertLessThan($result, 0);
$this->assertLessThan($result, 0, $localobject->errorsToString());
return $result;
}