From f93252907726966bd39fa0ac43a9aa89ed7d343b Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Thu, 11 May 2017 08:23:25 +0000 Subject: [PATCH] dblayeroo: catch the exception in prepare request and manage it in DBException git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3637 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayeroo.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dblayeroo.php b/dblayeroo.php index dbeaba9..9edfb70 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -2165,7 +2165,16 @@ class dblayeroo { $text = ""; if (!$textForm) - $st = self::$instance[$this->dsn]->prepare ($sql); + { + try + { + $st = self::$instance[$this->dsn]->prepare ($sql); + } + catch (\Exception $e) + { + $this->DBException ($e->getMessage ()); + } + } foreach ($this->whereGetValues () as $hash=>$val) { $field = $val["field"];