correct exceptions for Questgroupspictures and Questtexts
This commit is contained in:
parent
d49bc7261a
commit
d704265627
2 changed files with 7 additions and 2 deletions
|
|
@ -47,7 +47,12 @@
|
||||||
$questgroup = $this->Questgroups->getQuestgroupByUrl($seminary['id'], $questgroupUrl);
|
$questgroup = $this->Questgroups->getQuestgroupByUrl($seminary['id'], $questgroupUrl);
|
||||||
|
|
||||||
// Get Picture
|
// Get Picture
|
||||||
|
$picture = null;
|
||||||
|
try {
|
||||||
$picture = $this->Media->getMediaById($questgroup['questgroupspicture_id']);
|
$picture = $this->Media->getMediaById($questgroup['questgroupspicture_id']);
|
||||||
|
}
|
||||||
|
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Pass data to view
|
// Pass data to view
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@
|
||||||
$sidequestId
|
$sidequestId
|
||||||
);
|
);
|
||||||
if(empty($data)) {
|
if(empty($data)) {
|
||||||
throw new \nre\exceptions\IdNotFoundException();
|
throw new \nre\exceptions\IdNotFoundException($sidequestId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue