I find the following very good for most needs:

try:
    raise RuntimeError('err')
except:
    import traceback;traceback.print_exc()

-- if you use Pydev, there's a template for that called printexc.

Cheers,

Fabio

Saizan wrote:

>In an event-driven application i'd like to keep the program alive regardless 
>of any exceptions raised by the handlers,
>but still be able to debug them by reading the appropriate TraceBack from 
>stderr.
>I can put something like:
>
>try:
>       self.call_handler(handler,*args)
>except Exception, e:
>       print e
>       print e.args
>
>in the dispatcher, but that isn't as helpful as a complete TraceBack.
>  
>


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

Reply via email to