[Erp5-report] r35043 yo - /erp5/trunk/products/CMFActivity/ActivityTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu May 6 10:42:38 CEST 2010
Author: yo
Date: Thu May 6 10:42:36 2010
New Revision: 35043
URL: http://svn.erp5.org?rev=35043&view=rev
Log:
Emit a log message at every point where the Acitivity Tool might mark a message as MESSAGE_NOT_EXECUTABLE, as it seems to be happening even when re-invoking the same message may succeed, and this makes the debugging much easier. This should not degrade the performance significantly, because this kind of errors must be quite rare, as long as the the program is well written.
Modified:
erp5/trunk/products/CMFActivity/ActivityTool.py
Modified: erp5/trunk/products/CMFActivity/ActivityTool.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/ActivityTool.py?rev=35043&r1=35042&r2=35043&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/ActivityTool.py [utf8] (original)
+++ erp5/trunk/products/CMFActivity/ActivityTool.py [utf8] Thu May 6 10:42:36 2010
@@ -273,6 +273,10 @@
try:
obj = self.getObject(activity_tool)
except KeyError:
+ LOG('CMFActivity', ERROR,
+ 'Message failed in getting an object from the path %r' % \
+ (self.object_path,),
+ error=sys.exc_info())
self.setExecutionState(MESSAGE_NOT_EXECUTABLE, context=activity_tool)
else:
try:
@@ -286,6 +290,10 @@
# that method !
method = getattr(obj, self.method_id)
except:
+ LOG('CMFActivity', ERROR,
+ 'Message failed in getting a method %r from an object %r' % \
+ (self.method_id, obj,),
+ error=sys.exc_info())
method = None
self.setExecutionState(MESSAGE_NOT_EXECUTABLE, context=activity_tool)
else:
@@ -1180,6 +1188,10 @@
try:
obj = m.getObject(self)
except KeyError:
+ LOG('CMFActivity', ERROR,
+ 'Message failed in getting an object from the path %r' % \
+ (m.object_path,),
+ error=sys.exc_info())
m.setExecutionState(MESSAGE_NOT_EXECUTABLE, context=self)
continue
try:
More information about the Erp5-report
mailing list