[PyQt] Exception within Slot causes Abort

Barry Scott barry at barrys-emacs.org
Sun Mar 20 18:48:42 GMT 2016


When I used wxPython I had to wrap every callback in a try except block to
make sure that I could find all bugs. Without the wrappers bugs would vanish
silently.

What PyQt does is far better. I have a bug, see a traceback and can work
on the fix. I have not needed to use the try expect wrappers.

What I do do is redirect sys.stdout and sys.stderr into a log file so that I
have a record of any trace backs for my apps. And my users can provide
the log in bug reports. You can see the code I use on github:

https://github.com/barry-scott/git-workbench

In particular you might be interested in the module that turns stdout/stderr 
into a log stream.

https://github.com/barry-scott/git-workbench/blob/master/Source/Common/wb_logging.py

Barry



More information about the PyQt mailing list