dblayer : delete : raise a valid exception if the delete can't be done
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2901 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -952,7 +952,14 @@ class dblayer
|
||||
if ($this->debug) echo "DEBUG BIND : primary->".
|
||||
var_export ($deletekey, TRUE)."\n";
|
||||
$st->bindValue (":primary", $deletekey);
|
||||
$st->execute ();
|
||||
try
|
||||
{
|
||||
$st->execute ();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
throw new \Exception ($e->getMessage (), 500);
|
||||
}
|
||||
$nbLinesDeleted = $st->rowCount();
|
||||
$nbLinesDeleted = $this->hookpostdelete ($deletekey, $nbLinesDeleted);
|
||||
return $nbLinesDeleted;
|
||||
|
||||
Reference in New Issue
Block a user