[issue3112] implement PEP 3134 exception reporting

Antoine Pitrou report at bugs.python.org
Sun Jun 22 21:48:55 CEST 2008


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

Le dimanche 22 juin 2008 à 19:23 +0000, Adam Olsen a écrit :
> For this behaviour, this is the most natural way to write it.
> Conceptually, there shouldn't be a cycle

I agree your example is not far-fetched. How about avoiding cycles for
implicit chaining, and letting users shoot themselves in the foot with
explicit recursive chaining if they want? Detection would be cheap
enough, just a simple loop without any memory allocation.

> the traceback should be the
> lookup, then the fallback, then whatever code is about this - exactly
> the order the code executed in.

It would be the reverse: first the fallback, then the re-raised
exception. The last caught exception is always reported last, because
it's supposed to be the "main" or "highest-level" one.

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


More information about the Python-bugs-list mailing list