diff --git a/templating/matrix_templates/units.py b/templating/matrix_templates/units.py index e0394d15..07f5aefb 100644 --- a/templating/matrix_templates/units.py +++ b/templating/matrix_templates/units.py @@ -172,9 +172,10 @@ def get_json_schema_object_fields(obj, enforce_title=False, except Exception, e: e2 = Exception("Error reading property %s.%s: %s" % (obj_title, key_name, str(e))) + # throw the new exception with the old stack trace, so that + # we don't lose information about where the error occurred. raise e2, None, sys.exc_info()[2] - tables.insert(0, { "title": obj_title, "rows": first_table_rows, @@ -639,6 +640,8 @@ class MatrixUnits(Units): except Exception, e: e2 = Exception("Error reading event schema "+filepath+": "+ str(e)) + # throw the new exception with the old stack trace, so that + # we don't lose information about where the error occurred. raise e2, None, sys.exc_info()[2] return schemata