Close #20105: set __traceback__ when chaining exceptions in C

This commit is contained in:
Nick Coghlan 2014-01-27 00:53:38 +10:00
parent 23e37aa7b7
commit 77b286b2cc
5 changed files with 27 additions and 2 deletions

View file

@ -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()