summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-05-31 18:01:43 +0000
committerNorbert Preining <preining@logic.at>2012-05-31 18:01:43 +0000
commitfc601cee7bd140adb1136ac21a31799bc72d7244 (patch)
tree7fafec6401894cd2cd44bea994ff9b7a3c736bd7 /Master/tlpkg/TeXLive
parentaeb6accf2eb343657817c3485c0981e3ff46c954 (diff)
TeXCatalogue: don't stumble is XML parser dies
remove temporara texcatalogue.data and references to it git-svn-id: svn://tug.org/texlive/trunk@26741 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TeXCatalogue.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TeXCatalogue.pm b/Master/tlpkg/TeXLive/TeXCatalogue.pm
index 34f7a7f512b..575242d19a6 100644
--- a/Master/tlpkg/TeXLive/TeXCatalogue.pm
+++ b/Master/tlpkg/TeXLive/TeXCatalogue.pm
@@ -187,7 +187,15 @@ sub initialize {
# parse all the files
foreach (glob("?/*.xml")) {
open(my $io,"<$_") or die "Cannot read $_: $!";
- my $tce = TeXLive::TeXCatalogue::Entry->new( 'ioref' => $io );
+ our $tce;
+ # the XML parser die's on malformed xml entries, so we catch
+ # that and continue, simply skipping the entry
+ eval { $tce = TeXLive::TeXCatalogue::Entry->new( 'ioref' => $io ); };
+ if ($@) {
+ printf STDERR "TeX Catalogue: cannot read $_, skipping it!\n";
+ close($io);
+ next;
+ }
close($io);
$self->{'entries'}{lc($tce->{'entry'}{'id'})} = $tce;
}