Made error messages more useful.
authorSimon Howkins <simonh@symbian.org>
Wed, 05 Aug 2009 17:49:35 +0100
changeset 275 7b0a774a0c87
parent 274 72ceabdbb597
child 276 28c7ebde1768
Made error messages more useful.
common/tools/csvToSysDef.pl
--- a/common/tools/csvToSysDef.pl	Tue Aug 04 17:28:46 2009 +0100
+++ b/common/tools/csvToSysDef.pl	Wed Aug 05 17:49:35 2009 +0100
@@ -61,9 +61,9 @@
 		# TODO: Where will this be on the build machine?
 		$pkgDef = "$backupBaseDir/$pkgDef/package_definition.xml";
 	}
-	die unless -f $pkgDef;
+	die "Unable to locate any package_definition at all for $package->{dst}" unless -f $pkgDef;
 
-	my $pkgTree = $parser->parsefile($pkgDef) or die;
+	my $pkgTree = eval { $parser->parsefile($pkgDef) } or die "Failed to parse $pkgDef : $@";
 	if (!$outTree)
 	{
 		# The first file is taken verbatim
@@ -88,7 +88,7 @@
 	my $baseTree = shift or die;
 	my $extrasTree = shift or die;
 
-	die unless ref $baseTree eq ref $extrasTree;
+	die ("Package Definitions do not match: ".(ref $baseTree)." vs ".(ref $extrasTree)) unless ref $baseTree eq ref $extrasTree;
 	return if ref $baseTree eq "main::Characters";
 
 	foreach my $extraChild (@{$extrasTree->{Kids}})