]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
improved error message
authorJoey Hess <joey@kitenet.net>
Fri, 23 Apr 2010 18:50:00 +0000 (14:50 -0400)
committerJoey Hess <joey@kitenet.net>
Fri, 23 Apr 2010 18:50:00 +0000 (14:50 -0400)
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/template.pm

index 5d99c9da230c7b9c370f0b1bdac0430ffe746cab..95fe9031256f3050c0902932b91e7b1e0e9570a5 100644 (file)
@@ -329,11 +329,16 @@ sub preprocess_inline (@) {
        if (! $feedonly) {
                my $template;
                if (! $raw) {
+                       # cannot use wiki pages as templates; template not sanitized due to
+                       # format hook hack
                        eval {
                                $template=template_depends($params{template}.".tmpl", $params{page},
                                        blind_cache => 1);
                        };
-                       if ($@ || ! $template) {
+                       if ($@) {
+                               error gettext("failed to process template:")." $@";
+                       }
+                       if (! $template) {
                                error sprintf(gettext("template %s not found"), $params{template}.".tmpl");
                        }
                }
index fc82920105c99693a32ef10916a96f3b08f1d089..e5a0c05c3798470a6a787589b96d0fae7f876988 100644 (file)
@@ -41,7 +41,7 @@ sub preprocess (@) {
                        blind_cache => 1);
        };
        if ($@) {
-               error gettext("failed to process:")." $@";
+               error gettext("failed to process template:")." $@";
        }
        if (! $template) {
                error sprintf(gettext("%s not found"),