summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-12 22:48:25 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-12 22:48:25 +0200
commit9a97375ab386fa7fc20907847fe5adeec921aef0 (patch)
treec60dee183471711867a9ed2d1506a76f428a2a4e
parent1fbe0ea4cf1abcd98bcaae5750e372c244e08aeb (diff)
add comments on empty catch blocks
-rw-r--r--businesslayer/feedbusinesslayer.php2
-rw-r--r--controller/feedapicontroller.php6
-rw-r--r--controller/feedcontroller.php6
3 files changed, 14 insertions, 0 deletions
diff --git a/businesslayer/feedbusinesslayer.php b/businesslayer/feedbusinesslayer.php
index 04f3ff61e..05792059b 100644
--- a/businesslayer/feedbusinesslayer.php
+++ b/businesslayer/feedbusinesslayer.php
@@ -93,6 +93,8 @@ class FeedBusinessLayer extends BusinessLayer {
$this->mapper->findByUrlHash($feed->getUrlHash(), $userId);
throw new BusinessLayerConflictException(
$this->l10n->t('Can not add feed: Exists already'));
+
+ // If no matchin feed was found everything was ok
} catch(DoesNotExistException $ex){}
// insert feed
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);
diff --git a/controller/feedcontroller.php b/controller/feedcontroller.php
index afc3de742..56c7d5af8 100644
--- a/controller/feedcontroller.php
+++ b/controller/feedcontroller.php
@@ -67,6 +67,9 @@ class FeedController extends Controller {
try {
$params['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($params);
@@ -136,6 +139,9 @@ class FeedController extends Controller {
try {
$params['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($params);