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:
parent
8701cfd444
commit
92aff552e0
@ -86,7 +86,12 @@ class GroupController extends BaseController {
|
||||
}
|
||||
|
||||
$catman = new \OC_VCategories('contact', $this->api->getUserId());
|
||||
$ids = $catman->idsForCategory($name);
|
||||
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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
$catman->delete($name);
|
||||
try {
|
||||
$catman->delete($name);
|
||||
} catch(\Exception $e) {
|
||||
$response->setErrorMessage($e->getMessage());
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user