Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
01607f46
Commit
01607f46
authored
Oct 13, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ticket #346
parent
08fb6d10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-2
tests/run/funcexceptraise.pyx
tests/run/funcexceptraise.pyx
+19
-0
No files found.
Cython/Compiler/Nodes.py
View file @
01607f46
...
@@ -4137,8 +4137,9 @@ class TryExceptStatNode(StatNode):
...
@@ -4137,8 +4137,9 @@ class TryExceptStatNode(StatNode):
if
error_label_used
or
not
self
.
has_default_clause
:
if
error_label_used
or
not
self
.
has_default_clause
:
if
error_label_used
:
if
error_label_used
:
code
.
put_label
(
except_error_label
)
code
.
put_label
(
except_error_label
)
for
var
in
Naming
.
exc_save_vars
:
for
var
in
Naming
.
exc_save_vars
:
code
.
put_xgiveref
(
var
)
code
.
put_xdecref
(
var
,
py_object_type
)
code
.
putln
(
"__Pyx_ExceptionReset(%s);"
%
', '
.
join
(
Naming
.
exc_save_vars
))
code
.
put_goto
(
old_error_label
)
code
.
put_goto
(
old_error_label
)
for
exit_label
,
old_label
in
zip
(
for
exit_label
,
old_label
in
zip
(
...
...
tests/run/funcexceptraise.pyx
0 → 100644
View file @
01607f46
__doc__
=
u"""
>>> def bar():
... try:
... foo()
... except ValueError:
... pass
>>> bar()
>>> print(sys.exc_info())
(None, None, None)
"""
import
sys
def
foo
():
try
:
raise
TypeError
except
TypeError
:
raise
ValueError
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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