From 8d1caf18e91541635a2d80d57ce692ca3a02bea4 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 13 Jan 2011 01:09:20 -0500 Subject: [PATCH] Last of the pear error checks in krono that are in our control... Still have checks in places like the Holiday driver, where we can't get around that due to PEAR_Holidays using them. --- kronolith/lib/Driver/Horde.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kronolith/lib/Driver/Horde.php b/kronolith/lib/Driver/Horde.php index 51e26f920..b44a44596 100644 --- a/kronolith/lib/Driver/Horde.php +++ b/kronolith/lib/Driver/Horde.php @@ -112,7 +112,6 @@ class Kronolith_Driver_Horde extends Kronolith_Driver * @param Kronolith_Event_Horde $event The event to save. * * @return string The event id. - * @throws Horde_Exception * @throws Kronolith_Exception */ protected function _updateEvent($event) @@ -120,10 +119,12 @@ class Kronolith_Driver_Horde extends Kronolith_Driver if (!isset($this->api)) { list($this->api, $category) = explode('/', $this->calendar, 2); } - $result = $this->_params['registry']->call($this->api . '/saveTimeObject', array($event->timeobject)); - if ($result instanceof PEAR_Error) { - throw new Kronolith_Exception($result); + try { + $this->_params['registry']->call($this->api . '/saveTimeObject', array($event->timeobject)); + } catch (Horde_Exception $e) { + throw new Kronolith_Exception($e); } + return $event->timeobject['id']; } -- 2.11.0