From: Tara L Andrews Date: Sat, 16 Jun 2012 20:59:26 +0000 (+0200) Subject: add throw() sub to Lexeme.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dd007c4dc0296f626be5ecf67d8161a446851068;p=scpubgit%2Fstemmatology.git add throw() sub to Lexeme.pm --- diff --git a/lib/Text/Tradition/Collation/Reading/Lexeme.pm b/lib/Text/Tradition/Collation/Reading/Lexeme.pm index b6c7693..0d17763 100644 --- a/lib/Text/Tradition/Collation/Reading/Lexeme.pm +++ b/lib/Text/Tradition/Collation/Reading/Lexeme.pm @@ -4,6 +4,7 @@ use Moose; use JSON (); use Module::Load; use Text::Tradition::Collation::Reading::WordForm; +use Text::Tradition::Error; =head1 NAME @@ -188,6 +189,14 @@ sub TO_JSON { $hash->{'wordform_matchlist'} = [ $self->matching_forms ] if $self->matches; return $hash; } + +sub throw { + Text::Tradition::Error->throw( + 'ident' => 'Lexeme error', + 'message' => $_[0], + ); +} + no Moose; __PACKAGE__->meta->make_immutable;