specify name *and* role when raising FieldNotFound helps debugging
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 13 Jan 2010 17:42:27 +0100
changeset 4235 49eb7e87d36d
parent 4234 0adf45697422
child 4236 9260403bfe0b
specify name *and* role when raising FieldNotFound helps debugging
web/form.py
--- a/web/form.py	Wed Jan 13 17:41:42 2010 +0100
+++ b/web/form.py	Wed Jan 13 17:42:27 2010 +0100
@@ -113,7 +113,7 @@
         for field in cls_or_self._fieldsattr():
             if field.name == name and field.role == role:
                 return field
-        raise FieldNotFound(name)
+        raise FieldNotFound(name, role)
 
     @iclassmethod
     def fields_by_name(cls_or_self, name, role=None):