mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
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]
This commit is contained in:
parent
b0426cd8c4
commit
467ab194fc
7 changed files with 70 additions and 53 deletions
|
|
@ -222,8 +222,8 @@ class CAPITest(unittest.TestCase):
|
|||
br'result with an error set\n'
|
||||
br'ValueError\n'
|
||||
br'\n'
|
||||
br'During handling of the above exception, '
|
||||
br'another exception occurred:\n'
|
||||
br'The above exception was the direct cause '
|
||||
br'of the following exception:\n'
|
||||
br'\n'
|
||||
br'SystemError: <built-in '
|
||||
br'function return_result_with_error> '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue