Skip to content

Commit

Permalink
Exceptions not complete, will do in another ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
axel committed Jan 29, 2021
1 parent b7243a8 commit ebd5851
Show file tree
Hide file tree
Showing 10 changed files with 644 additions and 159 deletions.
15 changes: 14 additions & 1 deletion Controller/GrouperGroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,20 @@ public function groupOptin() {
$this->set('groupergroupoptin', $this->GrouperGroup->getSearchedGroups($this->userId, $searchCriteria, 'groupOptin'));
$this->set('searchcriteria', $searchCriteria);
} else {
$this->set('groupergroupoptin', $this->GrouperGroup->optinGroups($this->userId));
try {
$optin = $this->GrouperGroup->optinGroups($this->userId);
if (isset($optin['errorMessage'])){
$this->Flash->error($optin['errorMessage']);
$this->set('groupergroupoptin', array());
} else {
$this->set('groupergroupoptin', $optin);
}

} catch (Exception $e) {
CakeLog::write('error', 'GrouperLite Controller: Seeing is believing');
$this->Flash->error($e->getMessage());
$this->set('groupergroupoptin', array());
}
}
}

Expand Down
Loading

0 comments on commit ebd5851

Please sign in to comment.