mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-01-08 17:03:42 +01:00
matrix_templates/units.py: add some comments
... to help understand the slightly cryptic python incantation.
This commit is contained in:
parent
4875be05ce
commit
c0e5f3c3ca
|
|
@ -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…
Reference in a new issue