diff --git a/dblayer.php b/dblayer.php index 1334c5b..39f5567 100644 --- a/dblayer.php +++ b/dblayer.php @@ -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;