mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 03:16:40 +00:00
Normalize templating error
This commit is contained in:
@@ -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
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user