new exception handling semantics
authorStefan Behnel <scoder@users.berlios.de>
Tue, 2 Sep 2008 08:14:30 +0000 (10:14 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 2 Sep 2008 08:14:30 +0000 (10:14 +0200)
commit707ce62bd5443dd692bf0c8e12bcf173daadec5f
tree597874249a54bea6c8ce4bf9f5d731242b0aa0c2
parente74368f39425432af36c3e5c340bb5e8fccddf3d
new exception handling semantics
- the original exception status will be saved when entering a try: block
- sys.exc_info() will be reset after a successful except: block

This mimics the behaviour of Py3 and prevents exceptions, tracebacks
and frames (i.e. deep function state) from staying alive
any longer than necessary to handle an exception.

The new semantics imply that a try: block is no longer free, but it is still very cheap.
Cython/Compiler/Naming.py
Cython/Compiler/Nodes.py
tests/run/funcexcept.pyx [new file with mode: 0644]
tests/run/funcexceptchained.pyx [new file with mode: 0644]
tests/run/funcexceptcypy.pyx [new file with mode: 0644]
tests/run/funcexceptreturn.pyx [new file with mode: 0644]