This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients ggenellina, guettli, hoffman, ncoghlan, news1234, pakal, r.david.murray, vinay.sajip, ysj.ray
Date 2010-11-14.12:04:54
SpamBayes Score 8.7969534e-07
Marked as misclassified No
Message-id <>
As per my response to RDM on python-dev, I think the patch is misguided as it currently stands.

The traceback on an exception is built up as the stack unwinds. The stack above the frame containing the exception handler obviously hasn't been unwound yet, so it isn't included in the traceback object.

Since the frame containing the exception handler is live, it and the frame stack above it reflect the state of the exception handler, while the tracebacks on the chain of exceptions currently being handled reflect the parts of the stack that have already been unwound.

For explicit printing, a separate section printing the stack with print_stack() is a better option than trying to embed the information in the stack trace of the exception currently being handled.

For the logging use case, a separate "stack_trace" flag to request inclusion of stack trace details independent of the exception state seems like a preferable option.
Date User Action Args
2010-11-14 12:04:56ncoghlansetrecipients: + ncoghlan, vinay.sajip, guettli, hoffman, ggenellina, pakal, r.david.murray, news1234, ysj.ray
2010-11-14 12:04:56ncoghlansetmessageid: <>
2010-11-14 12:04:54ncoghlanlinkissue1553375 messages
2010-11-14 12:04:54ncoghlancreate