python3 won't let you declare an 'except' clause for a non-throwable type, even if the clause is never executed.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12448 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Stefan Zager 2011-02-10 05:05:14 +00:00
commit 5db5f109c7

View file

@ -5,20 +5,20 @@ a = A()
try:
a.foo()
except E1,e:
pass
# Throwing builtin classes as exceptions not supported
#except E1,e:
# pass
except:
# Throwing builtin classes as exceptions not supported
#raise RuntimeError, "bad exception order"
# raise RuntimeError, "bad exception order"
pass
try:
a.bar()
except E2,e:
pass
# Throwing builtin classes as exceptions not supported
#except E2,e:
# pass
except:
# Throwing builtin classes as exceptions not supported
#raise RuntimeError, "bad exception order"
# raise RuntimeError, "bad exception order"
pass
try:
@ -32,18 +32,18 @@ except RuntimeError,e:
try:
a.barfoo(1)
except E1,e:
pass
# Throwing builtin classes as exceptions not supported
#except E1,e:
# pass
except:
# Throwing builtin classes as exceptions not supported
#raise RuntimeError, "bad exception order"
# raise RuntimeError, "bad exception order"
pass
try:
a.barfoo(2)
except E2,e:
pass
# Throwing builtin classes as exceptions not supported
#except E2,e:
# pass
except:
# Throwing builtin classes as exceptions not supported
#raise RuntimeError, "bad exception order"
# raise RuntimeError, "bad exception order"
pass