X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition%2FParser%2FSelf.pm;h=432d8a37dd92b31278106a004868420924b41702;hb=00c5bf0b057ec7822786a9e3b7141fc0fa629350;hp=b8f12dd2121e59d25013fafc01c18e975234e612;hpb=350a6cdc3f099f91ff26f84facfefb1772db7c9b;p=scpubgit%2Fstemmatology.git diff --git a/lib/Text/Tradition/Parser/Self.pm b/lib/Text/Tradition/Parser/Self.pm index b8f12dd..432d8a3 100644 --- a/lib/Text/Tradition/Parser/Self.pm +++ b/lib/Text/Tradition/Parser/Self.pm @@ -3,6 +3,7 @@ package Text::Tradition::Parser::Self; use strict; use warnings; use Text::Tradition::Parser::GraphML qw/ graphml_parse /; +use TryCatch; =head1 NAME @@ -224,7 +225,11 @@ sub parse { $rel_exists = 1; } } - $collation->add_relationship( $from, $to, $e ) unless $rel_exists; + try { + $collation->add_relationship( $from, $to, $e ) unless $rel_exists; + } catch( Text::Tradition::Error $e ) { + warn "DROPPING $from -> $to: " . $e->message; + } } # Save the text for each witness so that we can ensure consistency