在 星期四 07 五月 2009 19:47:41,Frédéric Mantegazza 写道: > > 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 > > in > > 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 > box. > > Does anybody already done such decorator?
Maybe this way is too painful I think...
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
