]> granicus.if.org Git - python/commit
Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 21 Oct 2016 14:09:17 +0000 (17:09 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 21 Oct 2016 14:09:17 +0000 (17:09 +0300)
commit467ab194fc6189d9f7310c89937c51abeac56839
treeac2397959d646b3656fbf4759f4e6cb9d82e4ae6
parentb0426cd8c4ecaa19cff05b4860da1c06531a77c1
Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising
new exception with setting current exception as __cause__.

_PyErr_FormatFromCause(exception, format, args...) is equivalent to Python

    raise exception(format % args) from sys.exc_info()[1]
Include/pyerrors.h
Lib/test/test_capi.py
Modules/zipimport.c
Objects/abstract.c
Objects/genobject.c
Objects/unicodeobject.c
Python/errors.c