cvs: php4(NEW_UI_API) /pear/PEAR/Command Config.php
| From: | Stig Bakken | Date: | Sun, 02 Jun 2002 09:59:27 +0000 |
| Subject: | cvs: php4(NEW_UI_API) /pear/PEAR/Command Config.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4359@lists.php.net to get a copy of this message | ||
ssb Sun Jun 2 05:59:27 2002 EDT
Modified files: (Branch: NEW_UI_API)
/php4/pear/PEAR/Command Config.php
Log:
* fix some error reporting
Index: php4/pear/PEAR/Command/Config.php
diff -u php4/pear/PEAR/Command/Config.php:1.15.2.3 php4/pear/PEAR/Command/Config.php:1.15.2.4
--- php4/pear/PEAR/Command/Config.php:1.15.2.3 Sat Jun 1 14:39:36 2002
+++ php4/pear/PEAR/Command/Config.php Sun Jun 2 05:59:21 2002
@@ -18,7 +18,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Config.php,v 1.15.2.3 2002/06/01 18:39:36 dickmann Exp $
+// $Id: Config.php,v 1.15.2.4 2002/06/02 09:59:21 ssb Exp $
require_once "PEAR/Command/Common.php";
require_once "PEAR/Config.php";
@@ -83,8 +83,7 @@
{
// $params[0] -> the layer
if ($error = $this->_checkLayer(@$params[0])) {
- $failmsg .= $error;
- break;
+ return $this->raiseError($error);
}
$keys = $this->config->getKeys();
sort($keys);
@@ -111,11 +110,10 @@
// $params[0] -> the parameter
// $params[1] -> the layer
if ($error = $this->_checkLayer(@$params[1])) {
- $failmsg .= $error;
- break;
+ return $this->raiseError($error);
}
if (sizeof($params) < 1 || sizeof($params) > 2) {
- $failmsg .= "config-get expects 1 or 2 parameters";
+ return $this->raiseError("config-get expects 1 or 2 parameters");
} elseif (sizeof($params) == 1) {
$this->ui->outputData("$params[0] = " .
$this->config->get($params[0]), $command);
} else {