matrix_templates/units.py: add some comments
... to help understand the slightly cryptic python incantation.
This commit is contained in:
parent
4875be05ce
commit
c0e5f3c3ca
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue