cubicweb #3672623 improve error message generated by hooks called by session.commit() [open]

The cause of the following error is that the 'config' attribute is not correct.
The error is obviously intercepted by a hook.

Two suggestions:

1. Generally speaking, if the error message is generated by a hook, print a specific error message that says so. Otherwise the user is left looking for errors in the RQL request syntax itself. Having "cubicweb/server/" in the stack trace is not enough for newbies.

2. Improve the error message in this specific case. The error should probably be intercepted in "server/sources/" or earlier and a meaningful error message printed, such as:

Error while parsing attribute 'config' in line XXX.

>>> req
u"SET X url 'ldap://', X config '...', X parser 'ldapfeed', X type 'ldapfeed', X name 'Imagen' WHERE X is CWSource, X name 'Imagen'"
>>> rset = session.execute(req)
>>> session.commit()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/cubicweb/server/", line 1256, in commit
File "/usr/lib/python2.7/dist-packages/cubicweb/server/", line 775, in handle_event
getattr(self, event)()
File "/usr/lib/python2.7/dist-packages/cubicweb/hooks/", line 83, in precommit_event
conf = source.repo_source.check_config(source)
File "/usr/lib/python2.7/dist-packages/cubicweb/server/sources/", line 91, in check_config
typed_config = super(DataFeedSource, self).check_config(source_entity)
File "/usr/lib/python2.7/dist-packages/cubicweb/server/sources/", line 211, in check_config
return cls.check_conf_dict(source_entity.eid, source_entity.host_config,
File "/usr/lib/python2.7/dist-packages/cubicweb/entities/", line 62, in host_config
dictconfig = self.dictconfig
File "/usr/lib/python2.7/dist-packages/cubicweb/entities/", line 35, in dictconfig
return self.config and text_to_dict(self.config) or {}
File "/usr/lib/pymodules/python2.7/logilab/common/", line 300, in text_to_dict
key, value = [w.strip() for w in line.split('=', 1)]
ValueError: need more than 1 value to unpack
>>> req

done in<not specified>
closed by<not specified>