[PyQt] generic exception handler

Jeremy Sanders jeremy at jeremysanders.net
Thu Aug 19 17:16:51 BST 2010

Steve Borho wrote:

> Is there a way to register a generic exception handler with PyQt to
> catch errors that happen in signal handlers?  I use a Python library
> that emits 3-4 exceptions somewhat randomly for some fairly common
> error conditions, and it would be nice to handle them all in one
> place.

You probably want sys.excepthook - see 
for an example of catching exceptions to bring up a dialog.



More information about the PyQt mailing list