]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove two obsolete try...catch blocks.
authorBernhard Reiter <ockham@raz.or.at>
Sat, 4 Oct 2014 12:08:20 +0000 (14:08 +0200)
committerBernhard Reiter <ockham@raz.or.at>
Mon, 13 Oct 2014 22:06:07 +0000 (00:06 +0200)
lib/private/tags.php

index 5a962c4891dd4d57403d64cc0203eb24d093564a..aceb88355c878618bdb164b5bd1a433e68560a95 100644 (file)
@@ -99,12 +99,7 @@ class Tags implements \OCP\ITags {
        *
        */
        protected function loadTags($defaultTags=array()) {
-               try {
-                       $this->tags = $this->mapper->loadTags(array($this->user), $this->type);
-               } catch(\Exception $e) {
-                       \OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(),
-                               \OCP\Util::ERROR);
-               }
+               $this->tags = $this->mapper->loadTags(array($this->user), $this->type);
 
                if(count($defaultTags) > 0 && count($this->tags) === 0) {
                        $this->addMultiple($defaultTags, true);
@@ -580,13 +575,10 @@ class Tags implements \OCP\ITags {
                                $tag = $this->tags[$key];
                                $id = $tag->getId();
                                unset($this->tags[$key]);
-                               try {
-                                       $this->mapper->delete($tag);
-                               } catch(\Exception $e) {
-                                       \OCP\Util::writeLog('core', __METHOD__ . ', exception: '
-                                               . $e->getMessage(), \OCP\Util::ERROR);
-                                       return false;
-                               }
+                               $this->mapper->delete($tag);
+                       } else {
+                               \OCP\Util::writeLog('core', __METHOD__ . 'Cannot delete tag ' . $name
+                                       . ': not found.', \OCP\Util::ERROR);
                        }
                        if(!is_null($id) && $id !== false) {
                                try {