From b66770b697df6403b75ffd8fbbfacddc96f8b8a3 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Thu, 28 Mar 2013 05:01:45 +0100 Subject: [PATCH] Contacts: Cleanup and more logging in Contact --- lib/contact.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/contact.php b/lib/contact.php index a3bf1f61..d87bebe0 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -90,11 +90,7 @@ class Contact extends VObject\VCard implements IPIMObject { break; } } - }/* else { - throw new Exception( - __METHOD__ . ' 3rd argument must either be an array or a subclass of \VObject\VCard' - ); - }*/ + } } } @@ -297,8 +293,14 @@ class Contact extends VObject\VCard implements IPIMObject { $this->props['displayname'] = $result['displayname']; $this->props['permissions'] = $result['permissions']; } else { + \OCP\Util::writeLog('contacts', __METHOD__ + . ' Could not get vcard or carddata: ' + . $this->getId() + . print_r($result, true), \OCP\Util::DEBUG); return false; } + } else { + \OCP\Util::writeLog('contacts', __METHOD__.' Error getting contact: ' . $this->getId(), \OCP\Util::DEBUG); } } elseif(isset($this->props['carddata'])) { $data = $this->props['carddata'];