Revision: 3660
Author: pekka.klarck
Date: Sat May 29 08:01:57 2010
Log: swallowing exceptions isn't that good idea - also this could have caused those weird problems with signals and timeouts
http://code.google.com/p/robotframework/source/detail?r=3660

Modified:
 /trunk/src/robot/running/timeouts.py
 /trunk/src/robot/utils/robotthread.py

=======================================
--- /trunk/src/robot/running/timeouts.py        Sat May 29 07:28:57 2010
+++ /trunk/src/robot/running/timeouts.py        Sat May 29 08:01:57 2010
@@ -87,7 +87,11 @@
         runner = ThreadedRunner(runnable, args, kwargs)
         if runner.run_in_thread(timeout):
             return runner.get_result()
-        runner.stop_thread()
+        try:
+            runner.stop_thread()
+        except:
+            raise TimeoutError('Stopping keyword after %s failed: %s' %
+ (self.type.lower(), utils.get_error_message()))
         raise TimeoutError(self.get_message())

     def get_message(self):
=======================================
--- /trunk/src/robot/utils/robotthread.py       Sat May 29 07:03:02 2010
+++ /trunk/src/robot/utils/robotthread.py       Sat May 29 08:01:57 2010
@@ -16,8 +16,6 @@
 import sys
 from threading import Event

-from robot.utils import RERAISED_EXCEPTIONS
-

 if sys.platform.startswith('java'):
     from java.lang import Thread, Runnable, Throwable
@@ -63,9 +61,4 @@
         return self._result

     def stop_thread(self):
-        try:
-            self._thread.stop()
-        except RERAISED_EXCEPTIONS:
-            raise
-        except:
-            pass
+        self._thread.stop()

Reply via email to