]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/edittemplate.pm
Merge branch 'ready/comments'
[git.ikiwiki.info.git] / IkiWiki / Plugin / edittemplate.pm
index 061242fd82c1f1a76251dac12f8017821688a2a1..e3ce5e3d97437392c681f20f6c3a23b0b9690790 100644 (file)
@@ -130,9 +130,11 @@ sub filltemplate ($$) {
                $template=template("/".$template_page);
        };
        if ($@) {
+               # gettext can clobber $@
+               my $error = $@;
                # Indicate that the earlier preprocessor directive set 
                # up a template that doesn't work.
-               return "[[!pagetemplate ".gettext("failed to process template:")." $@]]";
+               return "[[!edittemplate ".gettext("failed to process template:")." $error]]";
        }
 
        $template->param(name => $page);