Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
c92a56dc
Commit
c92a56dc
authored
Jan 31, 2014
by
Paul Sokolovsky
Browse files
Add testcase with exception handler spread across functions.
parent
3f759b71
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/basics/try2.py
View file @
c92a56dc
...
...
@@ -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
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment