summaryrefslogtreecommitdiffstats
path: root/lib/template
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-11 10:08:36 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-11 10:08:36 +0100
commite540d25665e1933ddd1883d0e1dd9c373ffe3cd8 (patch)
tree86946cc2f28ea78041f524c96231d988988a781e /lib/template
parent52c4dc49cf460dad4edc42457ba9e3ca4c7674d5 (diff)
downloadgitbook-e540d25665e1933ddd1883d0e1dd9c373ffe3cd8.zip
gitbook-e540d25665e1933ddd1883d0e1dd9c373ffe3cd8.tar.gz
gitbook-e540d25665e1933ddd1883d0e1dd9c373ffe3cd8.tar.bz2
Normalize templating error
Diffstat (limited to 'lib/template')
-rw-r--r--lib/template/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/template/index.js b/lib/template/index.js
index 128e171..cd2735f 100644
--- a/lib/template/index.js
+++ b/lib/template/index.js
@@ -325,7 +325,9 @@ TemplateEngine.prototype.renderString = function(content, context, options) {
return Promise.nfcall(this.env.renderString.bind(this.env), content, context, options)
.fail(function(err) {
- throw error.enforce(err);
+ throw error.TemplateError(err, {
+ filename: options.path
+ });
});
};