X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2Fstemmatology.git;a=blobdiff_plain;f=stemmaweb%2Flib%2Fstemmaweb%2FController%2FRelation.pm;h=08421244d8111e3ceeebb9078218f38d11440ad8;hp=bd7d52727569002d99a1f10d9fd965d0331d257a;hb=a1411d50483bfd6cc561d7f8d81941cd6d6f61a9;hpb=ab06f3edf9045dc9a24ee138df7ae0b9bb141098 diff --git a/stemmaweb/lib/stemmaweb/Controller/Relation.pm b/stemmaweb/lib/stemmaweb/Controller/Relation.pm index bd7d527..0842124 100644 --- a/stemmaweb/lib/stemmaweb/Controller/Relation.pm +++ b/stemmaweb/lib/stemmaweb/Controller/Relation.pm @@ -324,9 +324,12 @@ sub reading :Chained('text') :PathPart :Args(1) { try { $idx = $lx->add_matching_form( $strrep ) - 1; } catch( Text::Tradition::Error $e ) { - # TODO catch other errors e.g. Moose ones $c->response->status( '403' ); $errmsg = $e->message; + } catch { + # Something else went wrong, probably a Moose error + $c->response->status( '403' ); + $errmsg = 'Something went wrong with the request'; } } $lx->disambiguate( $idx ) if defined $idx;