diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-01-08 20:18:04 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-01-08 20:18:04 +0100 |
commit | ec8911d4970372f2a513cf4f1fe78c46c29ed67c (patch) | |
tree | 85d4f67e7d8ab6ab21596377e8bd3e836b8a015d /lib/plugins/extension | |
parent | cf37525f0abe7425193f3ec2bf426cf834a949a3 (diff) | |
download | rpg-ec8911d4970372f2a513cf4f1fe78c46c29ed67c.tar.gz rpg-ec8911d4970372f2a513cf4f1fe78c46c29ed67c.tar.bz2 |
remove unneeded try/catch blocks
they were just catching and rethrowing
Diffstat (limited to 'lib/plugins/extension')
-rw-r--r-- | lib/plugins/extension/helper/extension.php | 24 |
1 files 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/.. |