diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-04-23 14:07:28 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-04-23 14:07:28 -0400 |
commit | 748aa7af777caaa32ac5ab56e707509b3739b49e (patch) | |
tree | e5ab8791c45420d114efee9df68cee2ef8181478 /doc | |
parent | 2c74f09bb870c717669f273ba7d4aa1637dcccf1 (diff) |
pagespec error/failure distinction and error display by inline
* Add IkiWiki::ErrorReason objects, and modify pagespecs to return
them in cases where they fail to match due to a configuration or syntax
error.
* inline: Display a handy error message if the inline cannot display any
pages due to such an error.
This is perhaps somewhat incomplete, as other users of pagespecs do not
display the error, and will eventually need similar modifications to inline.
I should probably factor out a pagespec_match_all function and make it throw
ErrorReasons.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/plugins/write.mdwn | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 11ed312ae..23df01ca7 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -890,9 +890,12 @@ It's also possible to write plugins that add new functions to IkiWiki::PageSpec package, that is named `match_foo`, where "foo()" is how it will be accessed in a [[ikiwiki/PageSpec]]. The function will be passed two parameters: The name of the page being matched, and the thing to match -against. It may also be passed additional, named parameters. It should return -a IkiWiki::SuccessReason object if the match succeeds, or an -IkiWiki::FailReason object if the match fails. +against. It may also be passed additional, named parameters. + +It should return a IkiWiki::SuccessReason object if the match succeeds, or +an IkiWiki::FailReason object if the match fails. If the match cannot be +attempted at all, for any page, it can instead return an +IkiWiki::ErrorReason object explaining why. ### Setup plugins |