/**
  * delete an object from a calendar
  *
  * @param \OCA\Calendar\IObject $object
  * @throws \OCA\Calendar\BusinessLayer\Exception
  */
 public function delete(IObject $object)
 {
     try {
         $this->checkCalendarSupports(Permissions::DELETE);
         if (!$this->api instanceof BackendUtils\IObjectAPIDelete) {
             throw new Exception('Backend does not support deleting objects');
         }
         Util::emitHook('\\OCA\\Calendar', 'preDeleteObject', array($object));
         $this->api->delete($object);
         if ($this->isCachingEnabled) {
             $this->updater->propagate($object->getUri());
         }
         Util::emitHook('\\OCA\\Calendar', 'postDeleteObject', array($object));
     } catch (BackendUtils\Exception $ex) {
         throw Exception::fromException($ex);
     }
 }