From 284a7d7e5af74cc6979378cb428c20ef98b4068c Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Fri, 19 Aug 2005 11:35:19 +0000 Subject: [PATCH 1/1] 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 --- lib/Maypole/View/Base.pm | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) 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}; -- 2.39.2