Change the order of tests in sub GetXsltDir, so that it tests relative to the root directory before using the current dir (which will always exist) HighFidelityModel
authorSimon Howkins <simonh@symbian.org>
Thu, 10 Jun 2010 16:30:35 +0100
branchHighFidelityModel
changeset 283 7b6dfbac0dd3
parent 282 b788617a584a
child 286 d3081d5ef75b
Change the order of tests in sub GetXsltDir, so that it tests relative to the root directory before using the current dir (which will always exist) Improved debug output when unable to open some of the files.
sysmodelgen/src/old/svg/DrawSvg.pm
--- a/sysmodelgen/src/old/svg/DrawSvg.pm	Thu Jun 10 15:00:37 2010 +0100
+++ b/sysmodelgen/src/old/svg/DrawSvg.pm	Thu Jun 10 16:30:35 2010 +0100
@@ -806,8 +806,8 @@
 
 	# Step 1:
 	# Create a Model.xml based on the ModelTemplate.xml
-	open (INPUT, $modelTemplateXml) or &Logger::LogError("Xalan error ($error) occured in Step 1 of SVG building...", KOldSystemModelGenerator, 1);
-	open (OUTPUT, ">$modelXml") or &Logger::LogError("Xalan error ($error) occured in Step 1 of SVG building...", KOldSystemModelGenerator, 1);
+	open (INPUT, $modelTemplateXml) or &Logger::LogError("Xalan error ($?) occured in Step 1 of SVG building (<$modelTemplateXml)...", KOldSystemModelGenerator, 1);
+	open (OUTPUT, ">$modelXml") or &Logger::LogError("Xalan error ($?) occured in Step 1 of SVG building (>$modelXml)...", KOldSystemModelGenerator, 1);
 	my $release = $self->{iRelease};
 	
 	
@@ -957,8 +957,8 @@
 	{
 	my $self = shift;
 	my $xsltDir = $FindBin::Bin."/svg";  # calcluated w.r.t old directory
+	$xsltDir = $FindBin::Bin."/src/old/svg" if ! -d $xsltDir; # calculated w.r.t the root directory
 	$xsltDir = $FindBin::Bin  if ! -d $xsltDir; # calculated w.r.t the /svg directory
-	$xsltDir = $FindBin::Bin."/src/old/svg" if ! -d $xsltDir; # calculated w.r.t the root directory
 	return $xsltDir;
 	}