From d276554c0e16727aacc27d7aacbd50cb77906a0b Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 8 Jun 2009 14:13:02 -0400 Subject: [PATCH] try/catch when calling facebook methods - the rethrow as our own exception --- timeobjects/lib/Driver/FacebookEvents.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/timeobjects/lib/Driver/FacebookEvents.php b/timeobjects/lib/Driver/FacebookEvents.php index 911da1d5e..790e1fb3e 100644 --- a/timeobjects/lib/Driver/FacebookEvents.php +++ b/timeobjects/lib/Driver/FacebookEvents.php @@ -34,8 +34,12 @@ class TimeObjects_Driver_FacebookEvents */ public function listTimeObjects($start = null, $time = null) { - $fb = $this->_getFacebook(); - $events = $fb->events->get(); + try { + $fb = $this->_getFacebook(); + $events = $fb->events->get(); + } catch (Horde_Service_Facebook_Exception $e) { + throw new TimeObjects($e->getMessage()); + } $objects = array(); foreach ($events as $event) { // FB s*cks. This may be right, or it may be wrong, or they may -- 2.11.0