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,
};
width: 250,
modal: true,
buttons: {
- Cancel: function() { $( this ).dialog( "close" ); },
+ Cancel: function() {
+ document.getElementById('duplicate-merge-error').innerHTML = "";
+ $( this ).dialog( "close" );
+ },
Detach: function ( evt ) {
evt.target.id = 'detach_btn';
var jqjson = $.post(ncpath, form_values, function(data) {
if (data.success) {
+ document.getElementById('duplicate-merge-error').innerHTML = "";
+
if (data.nodes) {
compress_nodes(data.nodes);
}