Commit 7d50999e authored by Vincent Pelletier's avatar Vincent Pelletier

Error path should report exception using less complex ways first, in case more complex ones fail.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22857 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 39d6ec4e
......@@ -243,16 +243,16 @@ class Message:
except:
self.is_executed = MESSAGE_NOT_EXECUTED
exc_info = sys.exc_info()
self.exc_type = exc_info[0]
self.exc_value = str(exc_info[1])
self.traceback = ''.join(ExceptionFormatter.format_exception(
*exc_info))
LOG('ActivityTool', WARNING,
'Could not call method %s on object %s' % (
self.method_id, self.object_path), error=exc_info)
# push the error in ZODB error_log
if getattr(activity_tool, 'error_log', None) is not None:
activity_tool.error_log.raising(exc_info)
self.exc_type = exc_info[0]
self.exc_value = str(exc_info[1])
self.traceback = ''.join(ExceptionFormatter.format_exception(
*exc_info))
def validate(self, activity, activity_tool, check_order_validation=1):
return activity.validate(activity_tool, self,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment