diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-13 15:05:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-13 15:05:34 -0400 |
commit | ffc99f5904934e6e7532bb8cfdebb44ad9ecd913 (patch) | |
tree | ec5d4d68b68c4fbbd77d33b51e59056ec011bc80 /IkiWiki/Plugin/postsparkline.pm | |
parent | edb59cd5b949de7a68f3b74e7949bf3893b23c6a (diff) | |
download | ikiwiki-ffc99f5904934e6e7532bb8cfdebb44ad9ecd913.tar ikiwiki-ffc99f5904934e6e7532bb8cfdebb44ad9ecd913.tar.gz |
switch preprocess hooks to use error function
Diffstat (limited to 'IkiWiki/Plugin/postsparkline.pm')
-rw-r--r-- | IkiWiki/Plugin/postsparkline.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm index 9e885741e..6fc96f8b3 100644 --- a/IkiWiki/Plugin/postsparkline.pm +++ b/IkiWiki/Plugin/postsparkline.pm @@ -29,14 +29,14 @@ sub preprocess (@) { #{{{ } if (! exists $params{formula}) { - return "[[postsparkline ".gettext("missing formula")."]]"; + error gettext("missing formula") } my $formula=$params{formula}; $formula=~s/[^a-zA-Z0-9]*//g; $formula=IkiWiki::possibly_foolish_untaint($formula); if (! length $formula || ! IkiWiki::Plugin::postsparkline::formula->can($formula)) { - return "[[postsparkline ".gettext("unknown formula")."]]"; + error gettext("unknown formula"); } add_depends($params{page}, $params{pages}); @@ -53,7 +53,7 @@ sub preprocess (@) { #{{{ my @data=eval qq{IkiWiki::Plugin::postsparkline::formula::$formula(\\\%params, \@list)}; if ($@) { - return "[[postsparkline error $@]]"; + error $@; } if (! @data) { |