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:
parent
011049ffe2
commit
5db5f109c7
1 changed files with 16 additions and 16 deletions
|
|
@ -5,20 +5,20 @@ a = A()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
a.foo()
|
a.foo()
|
||||||
except E1,e:
|
# Throwing builtin classes as exceptions not supported
|
||||||
pass
|
#except E1,e:
|
||||||
|
# pass
|
||||||
except:
|
except:
|
||||||
# Throwing builtin classes as exceptions not supported
|
# raise RuntimeError, "bad exception order"
|
||||||
#raise RuntimeError, "bad exception order"
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
a.bar()
|
a.bar()
|
||||||
except E2,e:
|
# Throwing builtin classes as exceptions not supported
|
||||||
pass
|
#except E2,e:
|
||||||
|
# pass
|
||||||
except:
|
except:
|
||||||
# Throwing builtin classes as exceptions not supported
|
# raise RuntimeError, "bad exception order"
|
||||||
#raise RuntimeError, "bad exception order"
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -32,18 +32,18 @@ except RuntimeError,e:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
a.barfoo(1)
|
a.barfoo(1)
|
||||||
except E1,e:
|
# Throwing builtin classes as exceptions not supported
|
||||||
pass
|
#except E1,e:
|
||||||
|
# pass
|
||||||
except:
|
except:
|
||||||
# Throwing builtin classes as exceptions not supported
|
# raise RuntimeError, "bad exception order"
|
||||||
#raise RuntimeError, "bad exception order"
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
a.barfoo(2)
|
a.barfoo(2)
|
||||||
except E2,e:
|
# Throwing builtin classes as exceptions not supported
|
||||||
pass
|
#except E2,e:
|
||||||
|
# pass
|
||||||
except:
|
except:
|
||||||
# Throwing builtin classes as exceptions not supported
|
# raise RuntimeError, "bad exception order"
|
||||||
#raise RuntimeError, "bad exception order"
|
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue