aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 37a81e444..a92021f0c 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -11,7 +11,7 @@ use Utils;
__PACKAGE__->config(
TEMPLATE_EXTENSION => '.html',
- INCLUDE_PATH => [ #
+ INCLUDE_PATH => [
FixMyStreet->path_to( 'templates', 'web', 'base' ),
],
ENCODING => 'utf8',
@@ -38,6 +38,15 @@ TT View for FixMyStreet::App.
=cut
+# Override parent function so that errors are only logged once.
+sub _rendering_error {
+ my ($self, $c, $err) = @_;
+ my $error = qq/Couldn't render template "$err"/;
+ # $c->log->error($error);
+ $c->error($error);
+ return 0;
+}
+
=head2 loc
[% loc('Some text to localize', 'Optional comment for translator') %]