When in debug mode, print the lookup name of the column with a template that is throwing an exception.

This commit is contained in:
Charles Haley 2016-09-18 10:43:51 +02:00
parent 6a1f567b1f
commit 84b8b32866

View File

@ -525,6 +525,8 @@ class TemplateFormatter(string.Formatter):
except Exception as e: except Exception as e:
if DEBUG: # and getattr(e, 'is_locking_error', False): if DEBUG: # and getattr(e, 'is_locking_error', False):
traceback.print_exc() traceback.print_exc()
if column_name:
print('Error evaluating column named: %s' % column_name)
ans = error_value + ' ' + e.message ans = error_value + ' ' + e.message
return ans return ans