Pascal Chambon <chambon.pas...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue1553375>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to