From: Jan Schneider Date: Fri, 28 Jan 2011 20:29:02 +0000 (+0100) Subject: This class doesn't need a logger, any errors are already logged by the Db X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=dac06838b80c3effa661d38eaaea589de784b42e;p=horde.git This class doesn't need a logger, any errors are already logged by the Db instance. Fixes also re-throwing exceptions. --- 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); } } }