Added eval; site now shows clean dataset missing message instead of server error...
[sgn.git] / lib / SGN / Controller / Search / Annotation.pm
blob626e2fa2410a9b983a9b41b0eb974b27ff7715e9
1 package SGN::Controller::Search::Annotation;
2 use Moose;
4 BEGIN{ extends 'Catalyst::Controller' }
7 sub annotation_search : Path('/search/annotation') CaptureArgs(1) {
8 my $self = shift;
9 my $c = shift;
10 my $page = shift;
12 my $template = '/search/annotation/'.$page. '.mas';
14 $c->stash(
15 template => $template,
18 $c->throw_404
19 unless $c->view('Mason')->component_exists( $template );