mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Close #20105: set __traceback__ when chaining exceptions in C
This commit is contained in:
parent
23e37aa7b7
commit
77b286b2cc
5 changed files with 27 additions and 2 deletions
|
|
@ -90,6 +90,16 @@ in various ways. There is a separate error indicator for each thread.
|
|||
the class in that case. If the values are already normalized, nothing happens.
|
||||
The delayed normalization is implemented to improve performance.
|
||||
|
||||
.. note::
|
||||
|
||||
This function *does not* implicitly set the ``__traceback__``
|
||||
attribute on the exception value. If setting the traceback
|
||||
appropriately is desired, the following additional snippet is needed::
|
||||
|
||||
if (tb != NULL) {
|
||||
PyException_SetTraceback(val, tb);
|
||||
}
|
||||
|
||||
|
||||
.. c:function:: void PyErr_Clear()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue