From 9a97375ab386fa7fc20907847fe5adeec921aef0 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 12 May 2014 22:48:25 +0200 Subject: add comments on empty catch blocks --- controller/feedapicontroller.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'controller/feedapicontroller.php') diff --git a/controller/feedapicontroller.php b/controller/feedapicontroller.php index 98fc834f7..05c50543e 100644 --- a/controller/feedapicontroller.php +++ b/controller/feedapicontroller.php @@ -70,6 +70,9 @@ class FeedApiController extends Controller { try { $result['newestItemId'] = $this->itemBusinessLayer->getNewestItemId($this->userId); + + // An exception occurs if there is a newest item. If there is none, + // simply ignore it and do not add the newestItemId } catch(BusinessLayerException $ex) {} return new JSONResponse($result); @@ -96,6 +99,9 @@ class FeedApiController extends Controller { try { $result['newestItemId'] = $this->itemBusinessLayer->getNewestItemId($this->userId); + + // An exception occurs if there is a newest item. If there is none, + // simply ignore it and do not add the newestItemId } catch(BusinessLayerException $ex) {} return new JSONResponse($result); -- cgit v1.2.3