En Wed, 30 May 2007 15:30:43 -0300, Nebur <[EMAIL PROTECTED]>  
escribió:

> @Tijs: I think when re-raising, the backtrace will always point to the
> line where it was re-raised but not to line 1265. (Or can we re-raise
> an exception so that it preserves the backtrace of the "original"
> exception?)

I think Tijs is right. raise (with no arguments) will raise the *last*  
exception, not the one that was active when you entered the except clause;  
it preserves the traceback.
Either replace the inner try/except using getattr, or save the full  
exception details (including traceback) and use the 3-argument form of the  
raise statement.
See http://docs.python.org/ref/raise.html

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to