[Checkins] SVN: z3c.schema2xml/branches/combined-deserialization-errors/src/z3c/schema2xml/_schema2xml.py Use the field objects instead of field names for reporting errors.
Christian Theune
ct at gocept.com
Thu Oct 1 08:58:34 EDT 2009
Log message for revision 104679:
Use the field objects instead of field names for reporting errors.
Changed:
U z3c.schema2xml/branches/combined-deserialization-errors/src/z3c/schema2xml/_schema2xml.py
-=-
Modified: z3c.schema2xml/branches/combined-deserialization-errors/src/z3c/schema2xml/_schema2xml.py
===================================================================
--- z3c.schema2xml/branches/combined-deserialization-errors/src/z3c/schema2xml/_schema2xml.py 2009-10-01 12:38:27 UTC (rev 104678)
+++ z3c.schema2xml/branches/combined-deserialization-errors/src/z3c/schema2xml/_schema2xml.py 2009-10-01 12:58:34 UTC (rev 104679)
@@ -28,8 +28,8 @@
class DeserializationError(TypeError):
"""Deserialization did not succeed.
- The attribute `field_errors` contains a dictionary mapping field names to
- an exception that occured.
+ The attribute `field_errors` contains a dictionary mapping each field for
+ which an exception occured to the corresponding exception.
"""
@@ -46,7 +46,7 @@
value = IXMLGenerator(field).input(element)
field.set(instance, value)
except Exception, e:
- errors[field.__name__] = e
+ errors[field] = e
if errors:
raise DeserializationError(errors)
More information about the checkins
mailing list