[issue1553375] Add traceback.print_full_exception()

Pascal Chambon report at bugs.python.org
Mon Nov 15 19:24:46 CET 2010


Pascal Chambon <chambon.pascal at gmail.com> added the comment:

I dont understand, if we use traceback.print_stack(), it's the stack at the exception handling point which will be displayed.

In my view, the interesting think was not the stack trace at the point where the exception is being handled, but where the unwinding stopped (i.e, a snapshot of the stack at the moment the exception was caught).

I agree that most of the time these stacks are quite close, but if you happen to move the traceback object all around, in misc. treatment functions (or even, if it has been returned by functions to their caller - let's be fool), it can be handy to still be able to output a full exception stack, like if the exception had flowed up to the root of the program. At least that's what'd interest me for debugging.

try:
   myfunction() #<- that's the point of which I'd likle a stack trace
except Exception, e:
   handle_my_exception(e) #<- not of that point, some recursion levels deeper

Am I the only one viewing it as this ?

----------

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


More information about the Python-bugs-list mailing list