summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-09-27 15:47:14 -0400
committerJoey Hess <joey@kitenet.net>2010-09-27 15:58:01 -0400
commite22b18aabcb46e3c0eafeb466b51bb3eb18cf1e1 (patch)
tree08346e3dfa8aea5beb04aea2648a89c9fcbeedb6 /doc/plugins
parent00595b62be624b2b105a7b137d0502d235e55f87 (diff)
template_depends: throw nice error message when template cannot be found
plovs reported a crash when templates were not installed properly, with a non-useful error about the template object not being defined. I've audited all uses of template_depends(), and template(), and it makes sense for them to throw an error if the template cannot be found. All code with a user-supplied template catches errors already, to handle template parse failures. It did not make sense for template_file to throw errors, as some code uses it to probe if a template file is available.
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/write.mdwn2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index e60314485..d5bd1dd76 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -740,6 +740,8 @@ with no ".tmpl" extension. Template pages are normally looked for in
the templates/ directory. If the page name starts with "/", a page
elsewhere in the wiki can be used.
+If the template is not found, or contains a syntax error, an error is thrown.
+
### `template_depends($$;@)`
Use this instead of `template()` if the content of a template is being