catching all tracebacks

Timothy Smith timothy at open-networks.net
Thu Oct 6 01:54:05 CEST 2005


iw ant to use a singel try except statment with my main app loop in the 
middle and catch all tracebacks and email them to myself as a bug 
report. however it seems a little more tricky then i thought

try:
    Main.Main()
except Exception, err_o:
    print err_o.__class__.__name__, '//', err_o, '//', err_o.args

that was suggested to me however it doesn't catch the errors i made in 
the program, it just spits out a traceback.



More information about the Python-list mailing list