[req] clearer exception message
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Tue, 25 Apr 2017 17:10:16 +0200
changeset 12179 14f85569eda2
parent 12178 4cf9f257e0bf
child 12180 72a890b713c1
[req] clearer exception message Display what attribute trigger the NotImplementedError
cubicweb/req.py
--- a/cubicweb/req.py	Fri Apr 21 10:29:44 2017 +0200
+++ b/cubicweb/req.py	Tue Apr 25 17:10:16 2017 +0200
@@ -218,7 +218,8 @@
         eschema = self.vreg.schema.eschema(etype)
         for attr, value in kwargs.items():
             if isinstance(value, list) or isinstance(value, tuple):
-                raise NotImplementedError("List of values are not supported")
+                raise NotImplementedError(
+                    '{0}: list of values are not supported'.format(attr))
             if hasattr(value, 'eid'):
                 kwargs[attr] = value.eid
             if attr.startswith('reverse_'):