From dac06838b80c3effa661d38eaaea589de784b42e Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 28 Jan 2011 21:29:02 +0100 Subject: [PATCH] This class doesn't need a logger, any errors are already logged by the Db instance. Fixes also re-throwing exceptions. --- framework/History/lib/Horde/History/Sql.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/framework/History/lib/Horde/History/Sql.php b/framework/History/lib/Horde/History/Sql.php index 8888b33ee..a1354250f 100644 --- a/framework/History/lib/Horde/History/Sql.php +++ b/framework/History/lib/Horde/History/Sql.php @@ -42,10 +42,9 @@ class Horde_History_Sql extends Horde_History * * @throws Horde_History_Exception */ - public function __construct(Horde_Db_Adapter $db, Horde_Log_Logger $logger) + public function __construct(Horde_Db_Adapter $db) { $this->_db = $db; - $this->_logger = $logger; } /** @@ -120,10 +119,7 @@ class Horde_History_Sql extends Horde_History ' history_extra = ? WHERE history_id = ?', $values ); } catch (Horde_Db_Exception $e) { - if ($this->_logger) { - $this->_logger->err($e); - throw new Horde_History_Exception($e); - } + throw new Horde_History_Exception($e); } $done = true; @@ -155,10 +151,7 @@ class Horde_History_Sql extends Horde_History ' VALUES (?, ?, ?, ?, ?, ?)', $values ); } catch (Horde_Db_Exception $e) { - if ($this->_logger) { - $this->_logger->err($e); - throw new Horde_History_Exception($e); - } + throw new Horde_History_Exception($e); } } } -- 2.11.0