diff --git a/frappe/core/doctype/print_format/print_format.py b/frappe/core/doctype/print_format/print_format.py index 4d414c50e5..4de0b05d33 100644 --- a/frappe/core/doctype/print_format/print_format.py +++ b/frappe/core/doctype/print_format/print_format.py @@ -20,7 +20,8 @@ class PrintFormat(Document): jenv = frappe.get_jenv() try: jenv.from_string(self.html) - except TemplateSyntaxError: + except TemplateSyntaxError, e: + frappe.msgprint('Line {}: {}'.format(e.lineno, e.message)) frappe.throw(frappe._("Syntax error in Jinja template")) def on_update(self):