Message121238
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 ? |
|
Date |
User |
Action |
Args |
2010-11-15 18:24:46 | pakal | set | recipients:
+ pakal, vinay.sajip, guettli, hoffman, ncoghlan, ggenellina, r.david.murray, news1234, ysj.ray |
2010-11-15 18:24:46 | pakal | set | messageid: <1289845486.02.0.702888943634.issue1553375@psf.upfronthosting.co.za> |
2010-11-15 18:24:44 | pakal | link | issue1553375 messages |
2010-11-15 18:24:44 | pakal | create | |
|