[pypy-svn] r13537 - in pypy/dist/pypy/rpython: . test

tismer at codespeak.net tismer at codespeak.net
Fri Jun 17 15:40:29 CEST 2005


Author: tismer
Date: Fri Jun 17 15:40:29 2005
New Revision: 13537

Modified:
   pypy/dist/pypy/rpython/llinterp.py
   pypy/dist/pypy/rpython/test/test_llinterp.py
Log:
passing the arigo test.
Yes, the exception handler is only for the last
operation. In any other case, we need to use the
default exception handler.

Modified: pypy/dist/pypy/rpython/llinterp.py
==============================================================================
--- pypy/dist/pypy/rpython/llinterp.py	(original)
+++ pypy/dist/pypy/rpython/llinterp.py	Fri Jun 17 15:40:29 2005
@@ -79,7 +79,7 @@
             for op in block.operations:
                 self.eval_operation(op)
         except LLException, e:
-            if not catch_exception:
+            if not (catch_exception and op is block.operations[-1]):
                 # there is no explicit handler.
                 # we could simply re-raise here, but it is cleaner
                 # to redirect to the provided default exception block

Modified: pypy/dist/pypy/rpython/test/test_llinterp.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_llinterp.py	(original)
+++ pypy/dist/pypy/rpython/test/test_llinterp.py	Fri Jun 17 15:40:29 2005
@@ -75,7 +75,7 @@
     assert find_exception(info.value) is ValueError
 
 def test_call_raise_twice():
-    py.test.skip("exceptions in progress")
+    #py.test.skip("exceptions in progress")
     res = interpret(call_raise_twice, [6, 7])
     assert res == 13
     info = raises(LLException, interpret, call_raise_twice, [6, 42])



More information about the Pypy-commit mailing list