STINNER Victor added the comment: pyerr_assert.patch: modify PyErr_SetObject() and PyErr_Format() to fail with an assertion error if these functions are called with an exception set.
This patch detects where an exception is raised while another exception was already raised (like "try: ... except: raise ..."). I'm using this patch to explicitly not chain exceptions where chaining exceptions would be pointless (ex: replace a TypeError with a new TypeError with a better error message). ---------- keywords: +patch Added file: http://bugs.python.org/file38666/pyerr_assert.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23763> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com