diff options
author | Joey Hess <joey@kitenet.net> | 2010-09-27 15:47:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-09-27 15:58:01 -0400 |
commit | e22b18aabcb46e3c0eafeb466b51bb3eb18cf1e1 (patch) | |
tree | 08346e3dfa8aea5beb04aea2648a89c9fcbeedb6 /IkiWiki/Plugin/edittemplate.pm | |
parent | 00595b62be624b2b105a7b137d0502d235e55f87 (diff) | |
download | ikiwiki-e22b18aabcb46e3c0eafeb466b51bb3eb18cf1e1.tar ikiwiki-e22b18aabcb46e3c0eafeb466b51bb3eb18cf1e1.tar.gz |
template_depends: throw nice error message when template cannot be found
plovs reported a crash when templates were not installed properly,
with a non-useful error about the template object not being defined.
I've audited all uses of template_depends(), and template(), and it makes
sense for them to throw an error if the template cannot be found. All code
with a user-supplied template catches errors already, to handle template
parse failures.
It did not make sense for template_file to throw errors, as some code uses
it to probe if a template file is available.
Diffstat (limited to 'IkiWiki/Plugin/edittemplate.pm')
-rw-r--r-- | IkiWiki/Plugin/edittemplate.pm | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index 4f07866e4..576c94be4 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -132,9 +132,6 @@ sub filltemplate ($$) { # up a template that doesn't work. return "[[!pagetemplate ".gettext("failed to process template:")." $@]]"; } - if (! defined $template) { - return; - } $template->param(name => $page); |