aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-23 14:50:00 -0400
committerJoey Hess <joey@kitenet.net>2010-04-23 14:50:00 -0400
commitee8d237f98b2c82b441dc7c26f6ce8545362cb73 (patch)
tree8d7fb1aa0d349d7ae703ae7cdf43850e9c1237ee
parent753bfb17a0b593137341fe61c1a7db5dccd00efa (diff)
downloadikiwiki-ee8d237f98b2c82b441dc7c26f6ce8545362cb73.tar
ikiwiki-ee8d237f98b2c82b441dc7c26f6ce8545362cb73.tar.gz
improved error message
-rw-r--r--IkiWiki/Plugin/inline.pm7
-rw-r--r--IkiWiki/Plugin/template.pm2
2 files changed, 7 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 5d99c9da2..95fe90312 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -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");
}
}
diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
index fc8292010..e5a0c05c3 100644
--- a/IkiWiki/Plugin/template.pm
+++ b/IkiWiki/Plugin/template.pm
@@ -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"),