summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-04-06 16:24:15 (GMT)
committerAleksander Machniak <alec@alec.pl>2013-06-28 12:07:03 (GMT)
commit5e8d948f1857ff86392e8df0b4f601f5ec1f8124 (patch)
treec685e2eaa4895237814f24d29af1612a1e2323b5
parentb4a4dc45f84c0bd71843ad6aa2adecde247237c7 (diff)
downloadkolab-syncroton-5e8d948f1857ff86392e8df0b4f601f5ec1f8124.tar.gz
Throw exception in createEntry() of Email (and SMS) class
-rw-r--r--lib/kolab_sync_data_email.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/kolab_sync_data_email.php b/lib/kolab_sync_data_email.php
index 6959e71..e8f3db3 100644
--- a/lib/kolab_sync_data_email.php
+++ b/lib/kolab_sync_data_email.php
@@ -526,21 +526,25 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
/**
* add entry from xml data
*
- * @param string $folderId
- * @param Syncroton_Model_IEntry $entry
+ * @param string $folderId Folder identifier
+ * @param Syncroton_Model_IEntry $entry Entry
*
* @return array
*/
public function createEntry($folderId, Syncroton_Model_IEntry $entry)
{
+ // Throw exception here for better handling of unsupported
+ // entry creation, it can be object of class Email or SMS here
+ throw new Syncroton_Exception_Status_Sync(Syncroton_Exception_Status_Sync::SYNC_SERVER_ERROR);
}
/**
* update existing entry
*
- * @param string $folderId
- * @param string $serverId
- * @param Syncroton_Model_IEntry $entry
+ * @param string $folderId Folder identifier
+ * @param string $serverId Entry identifier
+ * @param Syncroton_Model_IEntry $entry Entry
+ *
* @return array
*/
public function updateEntry($folderId, $serverId, Syncroton_Model_IEntry $entry)