[issue3112] implement PEP 3134 exception reporting

Antoine Pitrou report at bugs.python.org
Sun Jun 22 16:07:13 CEST 2008


Antoine Pitrou <pitrou at free.fr> added the comment:

Le dimanche 22 juin 2008 à 07:04 +0000, Adam Olsen a écrit :
> Adam Olsen <rhamph at gmail.com> added the comment:
> 
> * cause/context cycles should be avoided.  Naive traceback printing
> could become confused, and I can't think of any accidental way to
> provoke it (besides the problem mentioned here.)

You mean they should be detected when the exception is set? I was afraid
that it may make exception raising slower. Reporting is not performance
sensitive in comparison to exception raising.

(the "problem mentioned here" is already avoided in the patch, but the
detection of other cycles is deferred to exception reporting for the
reason given above)

> * PyErr_Display is used by PyErr_Print, and it must end up with no
> active exception.  Additionally, third party code may depend on this
> semantic.  Maybe PyErr_DisplayEx?

I was not proposing to change the exception swallowing semantics, just
to add a return value indicating if any errors had occurred while
displaying the exception.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3112>
_______________________________________


More information about the Python-bugs-list mailing list