From ec8911d4970372f2a513cf4f1fe78c46c29ed67c Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Wed, 8 Jan 2014 20:18:04 +0100
Subject: [PATCH] remove unneeded try/catch blocks

they were just catching and rethrowing
---
 lib/plugins/extension/helper/extension.php | 24 ++++++++--------------
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php
index 1676e3962..3ff2ebcd8 100644
--- a/lib/plugins/extension/helper/extension.php
+++ b/lib/plugins/extension/helper/extension.php
@@ -613,19 +613,15 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
      * @return array The list of installed extensions
      */
     public function installOrUpdate() {
-        try {
-            $path      = $this->download($this->getDownloadURL());
-            $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase());
+        $path      = $this->download($this->getDownloadURL());
+        $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase());
 
-            // refresh extension information
-            if (!isset($installed[$this->getID()])) {
-                throw new Exception('Error, the requested extension hasn\'t been installed or updated');
-            }
-            $this->setExtension($this->getID());
-            $this->purgeCache();
-        }catch (Exception $e){
-            throw $e;
+        // refresh extension information
+        if (!isset($installed[$this->getID()])) {
+            throw new Exception('Error, the requested extension hasn\'t been installed or updated');
         }
+        $this->setExtension($this->getID());
+        $this->purgeCache();
         return $installed;
     }
 
@@ -828,11 +824,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
         }
 
         // decompress
-        try{
-            $this->decompress($file, "$tmp/".$base);
-        } catch (Exception $e) {
-            throw $e;
-        }
+        $this->decompress($file, "$tmp/".$base);
 
         // search $tmp/$base for the folder(s) that has been created
         // move the folder(s) to lib/..
-- 
GitLab