From 2a9e77a4bde4540af586e32011abee9251c7907b Mon Sep 17 00:00:00 2001 From: Lakshmi Vyasarajan Date: Sun, 29 May 2011 14:31:23 +0530 Subject: [PATCH] Added error info to log for debuggin purposes --- hyde/ext/templates/jinja.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hyde/ext/templates/jinja.py b/hyde/ext/templates/jinja.py index 6e86e1a..92ec1f2 100644 --- a/hyde/ext/templates/jinja.py +++ b/hyde/ext/templates/jinja.py @@ -599,7 +599,11 @@ class Jinja2Template(Template): """ text = self.env.loader.get_source(self.env, path)[0] from jinja2.meta import find_referenced_templates - ast = self.env.parse(text) + try: + ast = self.env.parse(text) + except: + logger.error("Error parsing[%s]" % path) + raise tpls = find_referenced_templates(ast) deps = list(self.env.globals['deps'].get('path', [])) for dep in tpls: