From b2dca89fb79ad11e0c022ac4b326eea80a8b8fb4 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 30 Oct 2013 16:36:35 +0100 Subject: [PATCH] Catch NotFound exceptions when deleting calendars. --- kronolith/lib/Driver/Sql.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kronolith/lib/Driver/Sql.php b/kronolith/lib/Driver/Sql.php index a890bcce420..ad87b447e78 100644 --- a/kronolith/lib/Driver/Sql.php +++ b/kronolith/lib/Driver/Sql.php @@ -754,11 +754,13 @@ public function delete($calendar) } } foreach ($uids as $uid) { - $event = $this->getByUID($uid, array($calendar)); try { + $event = $this->getByUID($uid, array($calendar)); $this->deleteEvent($event->id); - } catch (Kronolith_Exception $e) { - Horde::logMessage($e, 'ERR'); + } catch (Horde_Exception_NotFound $e) { + /* If deleting events with exceptions, those exceptions are + * returned by the listEvents() call, but they may have been + * deleted already with the base event. */ } }