# HG changeset patch # User Simon Howkins # Date 1276183835 -3600 # Node ID 7b6dfbac0dd3372891f4b220069c80394839eab4 # Parent b788617a584ade152ca43ee05f55e241cd7620cc 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. diff -r b788617a584a -r 7b6dfbac0dd3 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; }