Re-throwing an exception without loosing the stack trace
Michael Hudson
mwh at python.net
Wed Feb 13 08:25:25 EST 2002
Michael Ströder <michael at stroeder.com> writes:
> Chris Liechti wrote:
> >
> > "Clark C . Evans" <cce at clarkevans.com> wrote in
> > news:mailman.1013552683.30067.python-list at python.org:
> >
> > > How do I catch and then re-throw an exception without
> > > loosing the information about the stack trace? I've
> > > looked around alot and don't see the "obvious" answer.
> >
> > try a simple, naked "raise" ;-)
>
> Is that thread-safe?
Yes (the exception data gets stored in the threadstate).
Cheers,
M.
--
languages shape the way we think, or don't.
-- Erik Naggum, comp.lang.lisp
More information about the Python-list
mailing list