1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

Catch exceptions in GroupController

This commit is contained in:
Thomas Tanghus 2013-08-03 14:37:05 +02:00
parent 8701cfd444
commit 92aff552e0

View File

@ -86,7 +86,12 @@ class GroupController extends BaseController {
}
$catman = new \OC_VCategories('contact', $this->api->getUserId());
try {
$ids = $catman->idsForCategory($name);
} catch(\Exception $e) {
$response->setErrorMessage($e->getMessage());
return $response;
}
if($ids !== false) {
$app = new App($this->api->getUserId());
$backend = $app->getBackend('local');
@ -108,7 +113,11 @@ class GroupController extends BaseController {
}
}
}
try {
$catman->delete($name);
} catch(\Exception $e) {
$response->setErrorMessage($e->getMessage());
}
return $response;
}