From: Aaron Trevena Date: Fri, 19 Aug 2005 11:35:19 +0000 (+0000) Subject: improvement to error reporting for template problems [bug 14133] in Maypole::View... X-Git-Tag: 2.11~146 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=284a7d7e5af74cc6979378cb428c20ef98b4068c;p=maypole.git improvement to error reporting for template problems [bug 14133] in Maypole::View::Base git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@372 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/lib/Maypole/View/Base.pm b/lib/Maypole/View/Base.pm index 9615950..afba7a0 100644 --- a/lib/Maypole/View/Base.pm +++ b/lib/Maypole/View/Base.pm @@ -90,23 +90,31 @@ sub error { # a static page return -1 unless @{ $r->{objects} || [] }; + my $template_error = $r->{error}; $r->{error} = < Template not found +

Template not found

-This template was not found while processing the following request: +A template was not found while processing the following request: -@{[$r->{action}]} on table @{[ $r->{table} ]} with objects: +@{[$r->{action}]} on table +@{[ $r->{table} ]} with objects: -
+
 @{[join "\n", @{$r->{objects}}]}
-
+
-Looking for template @{[$r->{template}]} in paths: -
+The main template is @{[$r->{template}]}.
+The template subsystem's error message was
+
+$template_error
+
+We looked in paths: + +
 @{[ join "\n", $self->paths($r) ]}
-
+
EOF $r->{content_type} = "text/html"; $r->{output} = $r->{error};