[PyQt] Slot error handling
Baz Walter
bazwal at ftml.net
Mon Oct 19 18:40:50 BST 2009
Zac Burns wrote:
> Is there a way to add an error handler for all slots in an application?
>
> Eg: I have a window with lots of buttons and menus etc, connected via
> Signals/Slots. When slot code fails it prints a traceback to the
> console. I would rather it pop a dialog because the console is hidden.
> So, I would like to somewhere in my app say if any slot fails call
> this function with the exception, slot, signal, and whatever other
> info can be provided.
why not use sys.excepthook?
http://docs.python.org/library/sys.html#sys.excepthook
More information about the PyQt
mailing list