[gen] More accurate error reporting for Action fields.

This commit is contained in:
Gaetan Delannay 2012-08-07 09:46:27 +02:00
parent 47cd8ee277
commit 256f6acb55

View file

@ -957,12 +957,14 @@ class Type:
except TypeError, te:
# Try a version of the method that would accept self as an
# additional parameter.
tb = Traceback.get()
try:
return method(obj, self)
except Exception, e:
obj.log(Traceback.get(), type='error')
if raiseOnError: raise e
else: return str(e)
# Log the initial error.
obj.log(tb, type='error')
if raiseOnError: raise te
else: return str(te)
except Exception, e:
obj.log(Traceback.get(), type='error')
if raiseOnError: raise e