# HG changeset patch # User Bob Rosenberg # Date 1275394551 -3600 # Node ID fbf606da204466095ccc57e536404f7e556d01a5 # Parent 137189f7ec2919717ac5ab4d0444afb7890ea604 More detailed error messages when joining sysdef fragments diff -r 137189f7ec29 -r fbf606da2044 sysdeftools/joinsysdef-module.xsl --- a/sysdeftools/joinsysdef-module.xsl Tue Jun 01 11:42:12 2010 +0100 +++ b/sysdeftools/joinsysdef-module.xsl Tue Jun 01 13:15:51 2010 +0100 @@ -20,7 +20,14 @@ - ERROR: Cannot process this document + + ERROR: Cannot process this document (. Unrecognised syntax schema="" + . Missing schema + . Invalid file type: + + @@ -47,7 +54,7 @@ - Cannot set "", already set + Note: Cannot set "", already set. Ignoring linked value diff -r 137189f7ec29 -r fbf606da2044 sysdeftools/joinsysdef.pl --- a/sysdeftools/joinsysdef.pl Tue Jun 01 11:42:12 2010 +0100 +++ b/sysdeftools/joinsysdef.pl Tue Jun 01 13:15:51 2010 +0100 @@ -610,12 +610,19 @@ $link=&resolvePath($file,$link); if(-e $link) { - my $doc = $parser->parsefile ($link); - &checkSyntaxVersion($doc->getDocumentElement->getAttribute('schema')); # ensure we track we highest syntax number - my @docns = &namespaces($link,$doc->getDocumentElement); - undef $doc; - return (@res,@docns); - #ignore any children nodes if this is a link + my $doc; + eval { + $doc = $parser->parsefile ($link); + }; + if($doc) + { + &checkSyntaxVersion($doc->getDocumentElement->getAttribute('schema')); # ensure we track we highest syntax number + my @docns = &namespaces($link,$doc->getDocumentElement); + undef $doc; + return (@res,@docns); + #ignore any children nodes if this is a link + } + print STDERR "Error: Malformed XML. Could not process $link\n"; } # print STDERR "Note: $link not found\n"; -- no need to warm now. Do so later when trying to join }