AttributeError: last_traceback

Curtis Jensen cjensen at bioeng.ucsd.edu
Fri Aug 31 17:09:42 EDT 2001


I have a section of code similar to this:

    try:
      exec(  <SOMETHING> )
    except:
      print traceback.print_exc()

This is so exceptions don't bring down my program.  And some errors, I
can ignor.  However, some errors I need to debug.  For the errors I want
to debug, I'd like to uses "pdb.pm()"  however, I always get
"AttributeError: last_traceback" with "pdb.pm()"  Understandably, this
is because noe exception was loged, because I caught it.  

Is there a way I can catch exceptions and still use pdb.pm()?
Thanks.

-- 
Curtis Jensen
cjensen at bioeng.ucsd.edu
http://www-bioeng.ucsd.edu/~cjensen/
FAX (425) 740-1451



More information about the Python-list mailing list