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:
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue