Added diagnostic message to exception when TypeError occurs on write.

This commit is contained in:
emellor@ewan committed 2005-09-17 10:49:14 +01:00
1 parent fd3926cff3
commit b7411027d6
1 file changed
+6 -1
+6 -1
View File
@@ -67,7 +67,12 @@ class xstransact:
if not isinstance(d, dict):
raise TypeError
for key in d.keys():
self._write(key, d[key], create, excl)
try:
self._write(key, d[key], create, excl)
except TypeError, msg:
raise TypeError('Writing %s: %s: %s' %
(key, str(d[key]), msg))
elif isinstance(args[0], list):
for l in args:
if not len(l) == 2:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.