diff options
author | Simon McVittie <smcv@carbon.pseudorandom.co.uk> | 2008-07-14 23:34:07 +0100 |
---|---|---|
committer | Simon McVittie <smcv@carbon.pseudorandom.co.uk> | 2008-07-14 23:34:07 +0100 |
commit | 18b3e970ffcc0f74d68538b7094f76442a294609 (patch) | |
tree | 7565862f3e2f86a1e9ff623d991f3150860230a4 /doc/plugins/write.mdwn | |
parent | 23a3de5e8c4998c41afc99664fd4a7fe25e7bf29 (diff) | |
parent | 66053f6fc7b300c9b49a5c69d2c7a1eeec841743 (diff) |
Merge commit 'origin/master' into aggregateinternal
Diffstat (limited to 'doc/plugins/write.mdwn')
-rw-r--r-- | doc/plugins/write.mdwn | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 6b49ec58d..4dc55e302 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -412,12 +412,13 @@ Aborts with an error message. If the second parameter is passed, it is a function that is called after the error message is printed, to do any final cleanup. -Note that while any plugin can use this for a fatal error, plugins should -try to avoid dying on bad input when building a page, as that will halt -the entire wiki build and make the wiki unusable. So for example, if a -[[ikiwiki/PreProcessorDirective]] is passed bad parameters, it's better to -return an error message, which can appear on the wiki page, rather than -calling error(). +If called inside a preprocess hook, error() does not abort the entire +wiki build, but instead replaces the [[ikiwiki/PreProcessorDirective]] with +a version containing the error message. + +In other hooks, error() is a fatal error, so use with care. Try to avoid +dying on bad input when building a page, as that will halt +the entire wiki build and make the wiki unusable. #### `template($;@)` |