Commit d2c5bf94 authored by Vincent Pelletier's avatar Vincent Pelletier

Call sys.exc_info() just once in Message.__call__ error path.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19263 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9ee72682
...@@ -209,16 +209,17 @@ class Message: ...@@ -209,16 +209,17 @@ class Message:
self.is_executed = 1 self.is_executed = 1
except: except:
self.is_executed = 0 self.is_executed = 0
self.exc_type = sys.exc_info()[0] exc_info = sys.exc_info()
self.exc_value = str(sys.exc_info()[1]) self.exc_type = exc_info[0]
self.exc_value = str(exc_info[1])
self.traceback = ''.join(ExceptionFormatter.format_exception( self.traceback = ''.join(ExceptionFormatter.format_exception(
*sys.exc_info())) *exc_info))
LOG('ActivityTool', WARNING, LOG('ActivityTool', WARNING,
'Could not call method %s on object %s' % ( 'Could not call method %s on object %s' % (
self.method_id, self.object_path), error=sys.exc_info()) self.method_id, self.object_path), error=exc_info)
# push the error in ZODB error_log # push the error in ZODB error_log
if getattr(activity_tool, 'error_log', None) is not None: if getattr(activity_tool, 'error_log', None) is not None:
activity_tool.error_log.raising(sys.exc_info()) activity_tool.error_log.raising(exc_info)
def validate(self, activity, activity_tool, check_order_validation=1): def validate(self, activity, activity_tool, check_order_validation=1):
return activity.validate(activity_tool, self, 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