From: Gunnar Wrobel
Date: Mon, 18 Oct 2010 13:22:45 +0000 (+0200) Subject: Improved error handling. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e99346ee98d83d1eedf06189f11b127c5615b6f9;p=horde.git Improved error handling. --- diff --git a/components/lib/Components.php b/components/lib/Components.php index 3d6db5b06..eb9ec43c1 100644 --- a/components/lib/Components.php +++ b/components/lib/Components.php @@ -63,7 +63,7 @@ class Components $module->handle($config); } } catch (Components_Exception $e) { - $dependencies->getOutput()->fail($e->getMessage()); + $dependencies->getOutput()->fail($e); return; } } diff --git a/components/lib/Components/Pear/InstallLocation.php b/components/lib/Components/Pear/InstallLocation.php index 52987203b..f076efa84 100644 --- a/components/lib/Components/Pear/InstallLocation.php +++ b/components/lib/Components/Pear/InstallLocation.php @@ -201,7 +201,11 @@ class Components_Pear_InstallLocation if (!file_exists($this->_config_file)) { $this->createPearConfig(); } - return PEAR_Config::singleton($this->_config_file); + $config = PEAR_Config::singleton($this->_config_file); + if ($config instanceOf PEAR_Error) { + throw new Components_Exception($config->getMessage()); + } + return $config; } /**