Commit 83303fb6 authored by Jérome Perrin's avatar Jérome Perrin

improve a bit the failure notification message


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23319 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fa50ac5b
...@@ -289,6 +289,11 @@ class Message: ...@@ -289,6 +289,11 @@ class Message:
portal = activity_tool.getPortalObject() portal = activity_tool.getPortalObject()
user_email = portal.getProperty('email_to_address', user_email = portal.getProperty('email_to_address',
portal.getProperty('email_from_address')) portal.getProperty('email_from_address'))
call_traceback = ''
if self.call_traceback:
call_traceback = 'Created at:\n%s' % self.call_traceback
mail_text = """From: %s mail_text = """From: %s
To: %s To: %s
Subject: %s Subject: %s
...@@ -298,9 +303,8 @@ Subject: %s ...@@ -298,9 +303,8 @@ Subject: %s
Server: %s Server: %s
Document: %s Document: %s
Method: %s Method: %s
Arguments:%r Arguments: %r
Named Parameters:%r Named Parameters: %r
Created at:
%s %s
Exception: %s %s Exception: %s %s
...@@ -309,8 +313,7 @@ Exception: %s %s ...@@ -309,8 +313,7 @@ Exception: %s %s
""" % (activity_tool.email_from_address, user_email, message, message, """ % (activity_tool.email_from_address, user_email, message, message,
self.request_info.get('SERVER_URL', ''), self.request_info.get('SERVER_URL', ''),
'/'.join(self.object_path), self.method_id, self.args, self.kw, '/'.join(self.object_path), self.method_id, self.args, self.kw,
self.call_traceback, call_traceback, self.exc_type, self.exc_value, self.traceback)
self.exc_type, self.exc_value, self.traceback)
try: try:
activity_tool.MailHost.send( mail_text ) activity_tool.MailHost.send( mail_text )
except (socket.error, MailHostError), message: except (socket.error, MailHostError), message:
......
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