[Checkins] SVN: Zope3/branches/3.3/src/zope/schema/ When the
	validation of an object that is being set with an object
	field fails,
	the error was being swallowed by SchemaNotFullyImplemented which
	didn't carry over any additional info on what exactly failed
	which makes things very hard to debug ... changed things to
	include the original error so a traceback is more verbose.
    Rocky Burt 
    rocky at serverzen.com
       
    Sun May 21 11:28:32 EDT 2006
    
    
  
Log message for revision 68216:
  When the validation of an object that is being set with an object field fails, the error was being swallowed by SchemaNotFullyImplemented which didn't carry over any additional info on what exactly failed which makes things very hard to debug ... changed things to include the original error so a traceback is more verbose.
Changed:
  U   Zope3/branches/3.3/src/zope/schema/_field.py
  U   Zope3/branches/3.3/src/zope/schema/tests/test_objectfield.py
-=-
Modified: Zope3/branches/3.3/src/zope/schema/_field.py
===================================================================
--- Zope3/branches/3.3/src/zope/schema/_field.py	2006-05-21 15:15:21 UTC (rev 68215)
+++ Zope3/branches/3.3/src/zope/schema/_field.py	2006-05-21 15:28:31 UTC (rev 68216)
@@ -400,7 +400,7 @@
                 errors.append(error)
             except AttributeError, error:
                 # property for the given name is not implemented
-                errors.append(SchemaNotFullyImplemented())
+                errors.append(SchemaNotFullyImplemented(error))
     return errors
 
 
Modified: Zope3/branches/3.3/src/zope/schema/tests/test_objectfield.py
===================================================================
--- Zope3/branches/3.3/src/zope/schema/tests/test_objectfield.py	2006-05-21 15:15:21 UTC (rev 68215)
+++ Zope3/branches/3.3/src/zope/schema/tests/test_objectfield.py	2006-05-21 15:28:31 UTC (rev 68216)
@@ -180,7 +180,7 @@
         self.assertRaises(ValidationError, field.validate, data)
         self.assertRaises(WrongContainedType, field.validate, data)
         errors = self.getErrors(field.validate, data)
-        self.assertEquals(errors[0], SchemaNotFullyImplemented())
+        self.assert_(isinstance(errors[0], SchemaNotFullyImplemented))
 
 def test_suite():
     suite = TestSuite()
    
    
More information about the Checkins
mailing list