diff --git a/lib/template/index.js b/lib/template/index.js index 128e171b3..cd2735f64 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 + }); }); };