From 4709c7ac661b218cc01a1442af66bf8ce472ced0 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 26 Apr 2011 13:20:14 +0000 Subject: verbose err msg --- it.class | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'it.class') 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); } -- cgit v1.2.3