diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-04-15 17:34:54 +0100 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-04-15 17:35:54 +0100 |
commit | 13b568cda0c03acdd0b660590b2d3055e8e66c0a (patch) | |
tree | 67fe2b0144b7f099c38cb52a36e00dd34b0720d8 /perllib/FixMyStreet/App/Controller/Root.pm | |
parent | f95ec28737b06671b58eaa89ae752d78b03f2a87 (diff) |
Tidy up 404 template and add error message
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Root.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Root.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Root.pm b/perllib/FixMyStreet/App/Controller/Root.pm index 3280d02b9..33f870986 100644 --- a/perllib/FixMyStreet/App/Controller/Root.pm +++ b/perllib/FixMyStreet/App/Controller/Root.pm @@ -73,16 +73,16 @@ sub default : Path { =head2 page_not_found - $c->detach('/page_not_found'); + $c->detach('/page_not_found', [ $error_msg ] ); -Display a 404 page. +Display a 404 page. Pass in an optional error message in an arrayref. =cut sub page_not_found : Private { - my ( $self, $c ) = @_; - - $c->stash->{template} = 'errors/page_not_found.html'; + my ( $self, $c, $error_msg ) = @_; + $c->stash->{template} = 'errors/page_not_found.html'; + $c->stash->{error_msg} = $error_msg; $c->response->status(404); } |