[pypy-svn] r10358 - pypy/dist/pypy/objspace/flow
pedronis at codespeak.net
pedronis at codespeak.net
Wed Apr 6 12:54:04 CEST 2005
Author: pedronis
Date: Wed Apr 6 12:54:04 2005
New Revision: 10358
Modified:
pypy/dist/pypy/objspace/flow/objspace.py
Log:
catch unwrap exceptions in flowspace exception match
Modified: pypy/dist/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/objspace.py (original)
+++ pypy/dist/pypy/objspace/flow/objspace.py Wed Apr 6 12:54:04 2005
@@ -183,7 +183,11 @@
def exception_match(self, w_exc_type, w_check_class):
self.executioncontext.recorder.crnt_block.exc_handler = True
- if not isinstance(self.unwrap(w_check_class), tuple):
+ try:
+ check_class = self.unwrap(w_check_class)
+ except UnwrapException:
+ raise Exception, "non-constant except guard"
+ if not isinstance(check_class, tuple):
# the simple case
return ObjSpace.exception_match(self, w_exc_type, w_check_class)
# checking a tuple of classes
More information about the Pypy-commit
mailing list