消息 [233629]
Looking more closely at the patch:
* for the missing tracebacks, you're probably hitting the note in https://docs.python.org/3/c-api/exceptions.html#c.PyErr_NormalizeException and need an explicit call to PyErr_SetTraceback (My recollection is that I made this same mistake when working on the codec chaining patch, so we may want to revisit the comment before PyErr_NormalizeException that suggests making setting the traceback attribute on the normalized value implicit)
* to trigger the implicit chaining in PyErr_String, try calling PyErr_Restore on the normalized exception before calling PyErr_SetString, rather than just dropping the references. That should let you drop the subsequent explicit PyErr_SetContext call. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2015-01-08 08:47:20 | ncoghlan | 修改 | recipients:
+ ncoghlan, gvanrossum, rhettinger, belopolsky, scoder, vstinner, r.david.murray, python-dev, schlamar, Rosuav, serhiy.storchaka |
| 2015-01-08 08:47:20 | ncoghlan | 修改 | messageid: <1420706840.38.0.0765067033815.issue22906@psf.upfronthosting.co.za> |
| 2015-01-08 08:47:20 | ncoghlan | 链接 | issue22906 messages |
| 2015-01-08 08:47:20 | ncoghlan | 创建 | |
|