BEGIN { extends 'Catalyst::Controller' }
-
-sub throw {
- Text::Tradition::Error->throw(
- 'ident' => 'Collation error',
- 'message' => $_[0],
- );
-}
-
-
=head1 NAME
stemmaweb::Controller::Relation - Controller for the relationship mapper
# Finally, make sure we haven't screwed anything up.
foreach my $wit ( $tradition->witnesses ) {
my $pathtext = $collation->path_text( $wit->sigil );
- throw( "Text differs for witness " . $wit->sigil )
+ Text::Tradition::Error->throw_collation_error( "Text differs for witness " . $wit->sigil )
unless $pathtext eq $origtext{$wit->sigil};
if( $wit->is_layered ) {
my $acsig = $wit->sigil . $collation->ac_label;
$pathtext = $collation->path_text( $acsig );
- throw( "Layered text differs for witness " . $wit->sigil )
+ Text::Tradition::Error->throw_collation_error( "Layered text differs for witness " . $wit->sigil )
unless $pathtext eq $origtext{$acsig};
}
}
- } catch ($e) {
+ } catch (Text::Tradition::Error $e) {
$c->stash->{result} = {
error_msg => $e->message,
};