[PyQt] Catching python exceptions

Luper Rouch luper.rouch at gmail.com
Thu Mar 22 22:21:29 GMT 2007

Joseph Rawson a écrit :
> On Thursday 22 March 2007 16:47, Luper Rouch wrote:
>> Hi,
>> What is the proper way to add a global exceptions catcher to a
>> QApplication, for example to bring a bug report dialog when an exception
>> reaches the main event loop ?
>> I guess I have to make my own event loop but my attempts failed
>> miserably, any pointers to an example ?
> I just asked this question not long ago.  
> You can set sys.excepthook to a function that creates a dialog window.
I could not have dreamed of a simpler solution, thanks a lot Paul and 
Joseph :-)

More information about the PyQt mailing list