Commit 5abd8298 authored by Jérome Perrin's avatar Jérome Perrin

Report error type and error value in the activity failure notification

email. 



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6979 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 31145217
...@@ -184,6 +184,7 @@ class Message: ...@@ -184,6 +184,7 @@ class Message:
except: except:
self.is_executed = 0 self.is_executed = 0
self.exc_type = sys.exc_info()[0] self.exc_type = sys.exc_info()[0]
self.exc_value = str(sys.exc_info()[1])
self.traceback = ''.join(traceback.format_tb(sys.exc_info()[2])) self.traceback = ''.join(traceback.format_tb(sys.exc_info()[2]))
LOG('ActivityTool', WARNING, LOG('ActivityTool', WARNING,
'Could not call method %s on object %s' % ( 'Could not call method %s on object %s' % (
...@@ -210,10 +211,12 @@ Subject: %s ...@@ -210,10 +211,12 @@ Subject: %s
Document: %s Document: %s
Method: %s Method: %s
Exception: %s %s
Traceback: Traceback:
%s %s
""" % (activity_tool.email_from_address, user_email, message, """ % (activity_tool.email_from_address, user_email, message,
message, '/'.join(self.object_path), self.method_id, self.traceback) message, '/'.join(self.object_path), self.method_id,
self.exc_type, self.exc_value, self.traceback)
activity_tool.MailHost.send( mail_text ) activity_tool.MailHost.send( mail_text )
def reactivate(self, activity_tool): def reactivate(self, activity_tool):
......
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