From: Michael J. Rubinsky Date: Mon, 8 Jun 2009 18:13:02 +0000 (-0400) Subject: try/catch when calling facebook methods - the rethrow as our own exception X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d276554c0e16727aacc27d7aacbd50cb77906a0b;p=horde.git try/catch when calling facebook methods - the rethrow as our own exception --- 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