[pypy-svn] r10093 - pypy/dist/pypy/interpreter

rxe at codespeak.net rxe at codespeak.net
Tue Mar 22 22:31:02 CET 2005


Author: rxe
Date: Tue Mar 22 22:31:02 2005
New Revision: 10093

Modified:
   pypy/dist/pypy/interpreter/executioncontext.py
Log:
Intermediate checkin trying to track down problem with running profile.py


Modified: pypy/dist/pypy/interpreter/executioncontext.py
==============================================================================
--- pypy/dist/pypy/interpreter/executioncontext.py	(original)
+++ pypy/dist/pypy/interpreter/executioncontext.py	Tue Mar 22 22:31:02 2005
@@ -122,6 +122,11 @@
                 return frame.last_exception
         return None
 
+    def clear_exception(self):
+        if operror is not None:
+            operror.clear(space)
+
+
     def get_state_dict(self):
         """A mechanism to store arbitrary per ExecutionContext data.
         Similar to cpython's PyThreadState_GetDict.
@@ -173,8 +178,10 @@
         if self.w_profilefunc is not None:
             if event not in ['leaveframe', 'call']:
                 return
-            
+
+            last_exception = None
             if event == 'leaveframe':
+                last_exception = frame.last_exception
                 event = 'return'
 
             assert self.is_tracing == 0 
@@ -185,7 +192,8 @@
                                                         self.space.wrap(frame),
                                                         self.space.wrap(event), w_arg)
                 except:
-                    raise
+                    pass
             finally:
+                frame.last_exception = last_exception
                 self.is_tracing -= 1
 



More information about the Pypy-commit mailing list