summaryrefslogtreecommitdiffstats
path: root/apps/contacts/ajax/contact/deleteproperty.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts/ajax/contact/deleteproperty.php')
-rw-r--r--apps/contacts/ajax/contact/deleteproperty.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/contacts/ajax/contact/deleteproperty.php b/apps/contacts/ajax/contact/deleteproperty.php
index b76eb19462c..b76b6e55ede 100644
--- a/apps/contacts/ajax/contact/deleteproperty.php
+++ b/apps/contacts/ajax/contact/deleteproperty.php
@@ -40,8 +40,10 @@ if(is_null($line)) {
unset($vcard->children[$line]);
-if(!OC_Contacts_VCard::edit($id, $vcard)) {
- bailOut($l10n->t('Error deleting contact property.'));
+try {
+ OC_Contacts_VCard::edit($id, $vcard);
+} catch(Exception $e) {
+ bailOut($e->getMessage());
}
OCP\JSON::success(array(