From b75e88f65f732b23a1f471c9af04d1bfaf3130b8 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 20 Apr 2015 00:02:13 +0200 Subject: [PATCH] Get better PEAR:DB error logging (debuginfo included) --- lib/schema.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/schema.php b/lib/schema.php index 94cde28f9d..0421bcb810 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -350,7 +350,7 @@ class Schema $res = $this->conn->query("DROP TABLE $name"); if ($_PEAR->isError($res)) { - throw new Exception($res->getMessage()); + PEAR_ErrorToPEAR_Exception($res); } return true; @@ -389,7 +389,7 @@ class Schema implode(",", $columnNames).")"); if ($_PEAR->isError($res)) { - throw new Exception($res->getMessage()); + PEAR_ErrorToPEAR_Exception($res); } return true; @@ -411,7 +411,7 @@ class Schema $res = $this->conn->query("ALTER TABLE $table DROP INDEX $name"); if ($_PEAR->isError($res)) { - throw new Exception($res->getMessage()); + PEAR_ErrorToPEAR_Exception($res); } return true; @@ -436,7 +436,7 @@ class Schema $res = $this->conn->query($sql); if ($_PEAR->isError($res)) { - throw new Exception($res->getMessage()); + PEAR_ErrorToPEAR_Exception($res); } return true; @@ -463,7 +463,7 @@ class Schema $res = $this->conn->query($sql); if ($_PEAR->isError($res)) { - throw new Exception($res->getMessage()); + PEAR_ErrorToPEAR_Exception($res); } return true; @@ -489,7 +489,7 @@ class Schema $res = $this->conn->query($sql); if ($_PEAR->isError($res)) { - throw new Exception($res->getMessage()); + PEAR_ErrorToPEAR_Exception($res); } return true; @@ -535,7 +535,7 @@ class Schema $res = $this->conn->query($sql); if ($_PEAR->isError($res)) { - throw new Exception($res->getMessage()); + PEAR_ErrorToPEAR_Exception($res); } } return $ok; @@ -1045,7 +1045,7 @@ class Schema $res = $this->conn->query($sql); if ($_PEAR->isError($res)) { - throw new Exception($res->getMessage()); + PEAR_ErrorToPEAR_Exception($res); } $out = array();