Author: remi
Date: 2009-06-22 14:35:10 +0200 (Mon, 22 Jun 2009)
New Revision: 4853

Modified:
   software_suite_v3/smart-core/smart-server/trunk/util/scheduler/Task.py
Log:
* added traceback report on task execution error

Modified: software_suite_v3/smart-core/smart-server/trunk/util/scheduler/Task.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/scheduler/Task.py      
2009-06-22 12:34:18 UTC (rev 4852)
+++ software_suite_v3/smart-core/smart-server/trunk/util/scheduler/Task.py      
2009-06-22 12:35:10 UTC (rev 4853)
@@ -231,8 +231,15 @@
                 arguments = self.__description.getArguments()
                 command(*arguments)
             except:
-                print "error"
-                pass
+                import sys
+                import traceback
+                fList = traceback.format_exception(sys.exc_info()[0],
+                    sys.exc_info()[1],
+                    sys.exc_info()[2])
+                trace = ""
+                for line in fList:
+                    trace += line
+                print trace
         t = threading.Thread(target = async)
         t.start()
         return True


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to