diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-11 10:08:36 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-11 10:08:36 +0100 |
commit | e540d25665e1933ddd1883d0e1dd9c373ffe3cd8 (patch) | |
tree | 86946cc2f28ea78041f524c96231d988988a781e /lib/template/index.js | |
parent | 52c4dc49cf460dad4edc42457ba9e3ca4c7674d5 (diff) | |
download | gitbook-e540d25665e1933ddd1883d0e1dd9c373ffe3cd8.zip gitbook-e540d25665e1933ddd1883d0e1dd9c373ffe3cd8.tar.gz gitbook-e540d25665e1933ddd1883d0e1dd9c373ffe3cd8.tar.bz2 |
Normalize templating error
Diffstat (limited to 'lib/template/index.js')
-rw-r--r-- | lib/template/index.js | 4 |
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 + }); }); }; |