Author: Ronan Lamy <[email protected]>
Branch: py3.5
Changeset: r92427:eb4262e7b726
Date: 2017-09-20 19:31 +0100
http://bitbucket.org/pypy/pypy/changeset/eb4262e7b726/
Log: Do implicit chaining in PyErr_SetObject()
diff --git a/pypy/module/cpyext/pyerrors.py b/pypy/module/cpyext/pyerrors.py
--- a/pypy/module/cpyext/pyerrors.py
+++ b/pypy/module/cpyext/pyerrors.py
@@ -50,7 +50,9 @@
"""This function is similar to PyErr_SetString() but lets you specify an
arbitrary Python object for the "value" of the exception."""
state = space.fromcache(State)
- state.set_exception(OperationError(w_type, w_value))
+ operr = OperationError(w_type, w_value)
+ operr.record_context(space, space.getexecutioncontext())
+ state.set_exception(operr)
@cpython_api([PyObject, CONST_STRING], lltype.Void)
def PyErr_SetString(space, w_type, message_ptr):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit