Presently, when Maypole::View::TT reports an error, there can be cases
when it doesn't log the name of the template where the error occurred. I
can't remember how general that is, but a specific example is:
plugin error - Null filename used at (eval 46) line 2.
...propagated at
/home/dhoworth/progs/modules/Template/Plugin/Class.pm
line 18.
So here's a simple patch to ensure that the failing template name is
also logged:
--- TT.pm
+++ Maypole/View/TT.pm Mon Mar 7 12:10:20 2005
@@ -31,7 +31,8 @@
return OK;
}
else {
- $r->{error} = $self->{tt}->error;
+ $r->{error} = "TT error for template '$template_file'\n" .
+ $self->{tt}->error;
return ERROR;
}
}
The error message is now:
TT error for template 'edit.tt'
plugin error - Null filename used at (eval 46) line 2.
...propagated at
/home/dhoworth/progs/modules/Template/Plugin/Class.pm
line 18.
I guess it's probably possible to figure out the relevant template path
as well ...