[gen] More accurate error reporting for Action fields.
This commit is contained in:
parent
47cd8ee277
commit
256f6acb55
|
@ -957,12 +957,14 @@ class Type:
|
||||||
except TypeError, te:
|
except TypeError, te:
|
||||||
# Try a version of the method that would accept self as an
|
# Try a version of the method that would accept self as an
|
||||||
# additional parameter.
|
# additional parameter.
|
||||||
|
tb = Traceback.get()
|
||||||
try:
|
try:
|
||||||
return method(obj, self)
|
return method(obj, self)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
obj.log(Traceback.get(), type='error')
|
# Log the initial error.
|
||||||
if raiseOnError: raise e
|
obj.log(tb, type='error')
|
||||||
else: return str(e)
|
if raiseOnError: raise te
|
||||||
|
else: return str(te)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
obj.log(Traceback.get(), type='error')
|
obj.log(Traceback.get(), type='error')
|
||||||
if raiseOnError: raise e
|
if raiseOnError: raise e
|
||||||
|
|
Loading…
Reference in a new issue