From 292146305cfe8c000eac7e8a384135e6250b0aed Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 22 Jan 2007 14:04:33 +0000 Subject: [PATCH] Improve error reporting. [originally from svn r7135] --- icons/icon.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/icons/icon.pl b/icons/icon.pl index b9cce7e3..f746d69c 100755 --- a/icons/icon.pl +++ b/icons/icon.pl @@ -203,7 +203,8 @@ sub readicon { $currbits += $depth; if ($x < $w && defined ($pix = $data->[$y*$w+$x])) { if (!defined $pal{$pix}) { - die "illegal colour value $pix at pixel $i in $filename\n"; + $pixhex = sprintf "%02x%02x%02x", unpack "CCC", $pix; + die "illegal colour value $pixhex at pixel ($x,$y) in $filename\n"; } $currbyte |= $pal{$pix}; }