Commit eb0f739f authored by Lisandro Dalcin's avatar Lisandro Dalcin

additional fix and test for ticket #650

parent f63b9469
......@@ -4145,7 +4145,9 @@ class RaiseStatNode(StatNode):
if self.exc_type and not self.exc_value and not self.exc_tb:
exc = self.exc_type
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
if exc.is_name and exc.entry.is_builtin:
self.builtin_exc_name = exc.name
......
......@@ -23,3 +23,12 @@ def raise_me_instance():
... else: print('NOT RAISED!')
"""
raise MemoryError()
def raise_me_instance_value():
"""
>>> raise_me_instance_value()
Traceback (most recent call last):
...
MemoryError: oom
"""
raise MemoryError("oom")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment