Browse Source

Add testcase with exception handler spread across functions.

pull/249/head
Paul Sokolovsky 11 years ago
parent
commit
c92a56dc93
  1. 17
      tests/basics/try2.py

17
tests/basics/try2.py

@ -21,3 +21,20 @@ try:
bar()
except NameError:
print("except 1")
# Check that exceptions across function boundaries work as expected
def func1():
try:
print("try func1")
func2()
except NameError:
print("except func1")
def func2():
try:
print("try func2")
foo()
except TypeError:
print("except func2")
func1()

Loading…
Cancel
Save