➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 serhiy.storchaka
收信人 ncoghlan, pitrou, serhiy.storchaka
日期 2016-10-19.08:23:27
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1476865407.89.0.760947488873.issue23188@psf.upfronthosting.co.za>
In-reply-to
内容
This helper is convenient in many cases, but it is very limited. It raises an exception with single string argument. It doesn't work in cases when the exception doesn't take arguments (PyErr_SetNone) or takes multiple or non-string arguments (PyErr_SetFromErrnoWithFilenameObject, PyErr_SetImportError). I think for public API we need more general solution. Something like this:

    PyObject *cause = get_current_exception();
    PyErr_SetImportError(msg, name, path);
    set_cause_of_current_exception(cause);
历史
日期 用户 动作 参数
2016-10-19 08:23:27serhiy.storchaka修改recipients: + serhiy.storchaka, ncoghlan, pitrou
2016-10-19 08:23:27serhiy.storchaka修改messageid: <1476865407.89.0.760947488873.issue23188@psf.upfronthosting.co.za>
2016-10-19 08:23:27serhiy.storchaka链接issue23188 messages
2016-10-19 08:23:27serhiy.storchaka创建