mailr13319 - /branches/gui_testing/gui/analyses/execute.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 29, 2011 - 19:10:
Author: bugman
Date: Wed Jun 29 19:10:24 2011
New Revision: 13319

URL: http://svn.gna.org/viewcvs/relax?rev=13319&view=rev
Log:
Errors are now caught in the thread and placed in the 
status.analyses.exception_queue Queue object.


Modified:
    branches/gui_testing/gui/analyses/execute.py

Modified: branches/gui_testing/gui/analyses/execute.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/execute.py?rev=13319&r1=13318&r2=13319&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/execute.py (original)
+++ branches/gui_testing/gui/analyses/execute.py Wed Jun 29 19:10:24 2011
@@ -24,10 +24,12 @@
 """Module containing the class for threaded and non-threaded analysis 
execution."""
 
 # Python module imports.
+import sys
 from threading import Thread
 
 # relax module imports.
 from relax_errors import RelaxImplementError
+from status import Status; status = Status()
 
 
 class Execute(Thread):
@@ -77,8 +79,12 @@
     def run(self):
         """Execute the thread (or pseudo-thread)."""
 
-        # Execute the analysis.
-        self.run_analysis()
+        # Execute the analysis, catching errors.
+        try:
+            self.run_analysis()
+        except:
+            # Place the analysis index and execution info into the exception 
queue.
+            status.analyses.exception_queue.put([self.data_index, 
sys.exc_info()])
 
 
     def run_analysis(self):




Related Messages


Powered by MHonArc, Updated Wed Jun 29 20:00:02 2011