try {
$fb = $storage->search($email);
return $json ? self::toJson($fb) : $fb;
- } catch (Kronolith_Exception $e) {
- if ($e->getCode() == Kronolith::ERROR_FB_NOT_FOUND) {
- if ($url) {
- throw new Kronolith_Exception(sprintf(_("No free/busy information found at the free/busy url of %s."), $email));
- }
- throw new Kronolith_Exception(sprintf(_("No free/busy url found for %s."), $email));
+ } catch (Horde_Exception_NotFound $e) {
+ if ($url) {
+ throw new Kronolith_Exception(sprintf(_("No free/busy information found at the free/busy url of %s."), $email));
}
+ throw new Kronolith_Exception(sprintf(_("No free/busy url found for %s."), $email));
}
/* Or else return an empty VFB object. */
const ITIP_REQUEST = 1;
const ITIP_CANCEL = 2;
- /** Free/Busy not found */
- const ERROR_FB_NOT_FOUND = 1;
-
/** The event can be delegated. */
const PERMS_DELEGATE = 1024;
$http->setBasicAuth(Horde_Auth::getAuth(), Horde_Auth::getCredential('password'));
@$http->sendRequest();
if ($http->getResponseCode() != 200) {
- throw new Kronolith_Exception(sprintf(_("Unable to retrieve free/busy information for %s"),
- $email), Kronolith::ERROR_FB_NOT_FOUND);
+ throw new Horde_Exception_NotFound();
}
$vfb_text = $http->getResponseBody();
$vfb = &$iCal->findComponent('VFREEBUSY');
if ($vfb === false) {
- throw new Kronolith_Exception(sprintf(_("No free/busy information is available for %s"),
- $email), Kronolith::ERROR_FB_NOT_FOUND);
+ throw new Horde_Exception_NotFound();
}
return $vfb;
return $vfb;
}
}
- throw new Kronolith_Exception(_("Not found"), Kronolith::ERROR_FB_NOT_FOUND);
+ throw new Horde_Exception_NotFound();
}
/**