summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2011-04-26 13:20:14 +0000
committerUrban Müller2011-04-26 13:20:14 +0000
commit4709c7ac661b218cc01a1442af66bf8ce472ced0 (patch)
tree0669d6f9b0f617c2a6acbcbf05a5cf54477d6c4c /it.class
parentd50cafe953f91a1e8ca3248330564a5434360ce9 (diff)
downloaditools-4709c7ac661b218cc01a1442af66bf8ce472ced0.tar.gz
itools-4709c7ac661b218cc01a1442af66bf8ce472ced0.tar.bz2
itools-4709c7ac661b218cc01a1442af66bf8ce472ced0.zip
verbose err msg
Diffstat (limited to 'it.class')
-rw-r--r--it.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/it.class b/it.class
index 69b0089..99c42b0 100644
--- a/it.class
+++ b/it.class
@@ -476,13 +476,13 @@ static function exec(/* $cmd, $values1 = array(), ... */)
if ($value === true || $value === false || $value === null)
$parts[] = $value ? $key : "";
else foreach ((array)$value as $val)
- $parts[] = "$key " . it::_exec_quotevalue($val);
+ $parts[] = "$key " . it::_exec_quotevalue($val, "cmd=$cmd key=$key val=$val");
}
}
else
{
foreach ((array)$values[$key] as $value)
- $parts[] = it::_exec_quotevalue($value);
+ $parts[] = it::_exec_quotevalue($value, "cmd=$cmd key=$key val=$val");
}
$replacements[$tag] = join(" ", $parts);
@@ -502,12 +502,12 @@ static function exec(/* $cmd, $values1 = array(), ... */)
}
#fails with C locale!!!
-static function _exec_quotevalue($value)
+static function _exec_quotevalue($value, $errmsg = "")
{
$result = strval($value);
if (it::match('^-', $result))
- it::fatal("leading - in value");
+ it::fatal("leading - in value: " . $errmsg);
return escapeshellarg($result);
}