diff options
Diffstat (limited to 'apps/contacts/lib/app.php')
-rw-r--r-- | apps/contacts/lib/app.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php index 67dfe8f640f..3972d0e0a5e 100644 --- a/apps/contacts/lib/app.php +++ b/apps/contacts/lib/app.php @@ -22,16 +22,18 @@ class OC_Contacts_App { public static $categories = null; public static function getAddressbook($id) { + // TODO: Throw an exception instead of returning json. $addressbook = OC_Contacts_Addressbook::find( $id ); if($addressbook === false || $addressbook['userid'] != OCP\USER::getUser()) { if ($addressbook === false) { OCP\Util::writeLog('contacts', 'Addressbook not found: '. $id, OCP\Util::ERROR); + //throw new Exception('Addressbook not found: '. $id); OCP\JSON::error( array( 'data' => array( - 'message' => self::$l10n->t('Addressbook not found.') + 'message' => self::$l10n->t('Addressbook not found: ' . $id) ) ) ); @@ -40,6 +42,7 @@ class OC_Contacts_App { OCP\Util::writeLog('contacts', 'Addressbook('.$id.') is not from '.OCP\USER::getUser(), OCP\Util::ERROR); + //throw new Exception('This is not your addressbook.'); OCP\JSON::error( array( 'data' => array( |