From e540d25665e1933ddd1883d0e1dd9c373ffe3cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Thu, 11 Feb 2016 10:08:36 +0100 Subject: [PATCH] Normalize templating error --- lib/template/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 + }); }); };