[PyQt] Catching exceptions everywhere
frederic.mantegazza at gbiloba.org
Thu May 7 12:47:41 BST 2009
> Is there a way to catch Python exceptions in all parts of a PyQt program?
> I have a "report bug" dialog box which gets called if an exception occurs
> the most frequently used parts of my program, but it would be nice if I
> could catch every unhandled exception globally.
> The really nice thing about python is that program tends to keep running
> despite an exception in a slot, so we don't get immediate data loss.
I don't know if it is possible to catch exceptions globally, but I was
thinking of using decorators arround all my PyQt callbacks, to add a
try/except feature, and display something like your "report bug" dialog
Does anybody already done such decorator?
More information about the PyQt