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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
eb0f739f
Commit
eb0f739f
authored
Apr 05, 2011
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional fix and test for ticket #650
parent
f63b9469
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-1
tests/run/raise_memory_error_T650.pyx
tests/run/raise_memory_error_T650.pyx
+9
-0
No files found.
Cython/Compiler/Nodes.py
View file @
eb0f739f
...
@@ -4145,7 +4145,9 @@ class RaiseStatNode(StatNode):
...
@@ -4145,7 +4145,9 @@ class RaiseStatNode(StatNode):
if
self
.
exc_type
and
not
self
.
exc_value
and
not
self
.
exc_tb
:
if
self
.
exc_type
and
not
self
.
exc_value
and
not
self
.
exc_tb
:
exc
=
self
.
exc_type
exc
=
self
.
exc_type
import
ExprNodes
import
ExprNodes
if
isinstance
(
exc
,
ExprNodes
.
SimpleCallNode
)
and
not
exc
.
args
:
if
(
isinstance
(
exc
,
ExprNodes
.
SimpleCallNode
)
and
not
(
exc
.
args
or
(
exc
.
arg_tuple
is
not
None
and
exc
.
arg_tuple
.
args
))):
exc
=
exc
.
function
# extract the exception type
exc
=
exc
.
function
# extract the exception type
if
exc
.
is_name
and
exc
.
entry
.
is_builtin
:
if
exc
.
is_name
and
exc
.
entry
.
is_builtin
:
self
.
builtin_exc_name
=
exc
.
name
self
.
builtin_exc_name
=
exc
.
name
...
...
tests/run/raise_memory_error_T650.pyx
View file @
eb0f739f
...
@@ -23,3 +23,12 @@ def raise_me_instance():
...
@@ -23,3 +23,12 @@ def raise_me_instance():
... else: print('NOT RAISED!')
... else: print('NOT RAISED!')
"""
"""
raise
MemoryError
()
raise
MemoryError
()
def
raise_me_instance_value
():
"""
>>> raise_me_instance_value()
Traceback (most recent call last):
...
MemoryError: oom
"""
raise
MemoryError
(
"oom"
)
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