diff options
author | Urban Müller | 2011-04-26 13:20:14 +0000 |
---|---|---|
committer | Urban Müller | 2011-04-26 13:20:14 +0000 |
commit | 4709c7ac661b218cc01a1442af66bf8ce472ced0 (patch) | |
tree | 0669d6f9b0f617c2a6acbcbf05a5cf54477d6c4c | |
parent | d50cafe953f91a1e8ca3248330564a5434360ce9 (diff) | |
download | itools-4709c7ac661b218cc01a1442af66bf8ce472ced0.tar.gz itools-4709c7ac661b218cc01a1442af66bf8ce472ced0.tar.bz2 itools-4709c7ac661b218cc01a1442af66bf8ce472ced0.zip |
verbose err msg
-rw-r--r-- | it.class | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); } |