Re-throwing an exception without loosing the stack trace

Clark C . Evans cce at clarkevans.com
Tue Feb 12 17:42:35 EST 2002


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.

Thanks!

Clark

P.S. I need to catch exceptions to clean up some
     resources (database locked table), but
     then I want to re-throw the error... in
     it's original stack trace so that I can
     find it... loosing the stack trace makes
     for brutal debugging.





More information about the Python-list mailing list