X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/09916a90ed9f22212ac62078132fd2375ed0017f..f4bf1b0bc219ee48e6ad92d2b227fbb1c055aae7:/IkiWiki/Plugin/meta.pm diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index ea099f955..cd367da70 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -155,14 +155,30 @@ sub preprocess (@) { eval q{use Date::Parse}; if (! $@) { my $time = str2time($value); - $IkiWiki::pagectime{$page}=$time if defined $time; + if (defined $time) { + $IkiWiki::pagectime{$page}=$time; + } + else { + error(sprintf(gettext('cannot parse date/time: %s'), $value)); + } + } + else { + error $@; } } elsif ($key eq 'updated') { eval q{use Date::Parse}; if (! $@) { my $time = str2time($value); - $pagestate{$page}{meta}{updated}=$time if defined $time; + if (defined $time) { + $pagestate{$page}{meta}{updated}=$time; + } + else { + error(sprintf(gettext('cannot parse date/time: %s'), $value)); + } + } + else { + error $@; } }