[PyQt] QThreads and exceptions

Szabo, Patrick (LNG-VIE) patrick.szabo at lexisnexis.at
Tue Dec 18 13:56:52 GMT 2012


I’m no expert on this but I don’t think you can catch it directly there. I think you need to catch it in the thread and then send a signal. But that should not be a problem since the handling can still happen in the mainthread.



Von: José M. Rodriguez Bacallao [mailto:jmrbcu at gmail.com]
Gesendet: Dienstag, 18. Dezember 2012 14:53
An: Szabo, Patrick (LNG-VIE)
Cc: PyQt Mailing List
Betreff: Re: [PyQt] QThreads and exceptions

no, what I want is to catch the exception in the main thread!

On Tue, Dec 18, 2012 at 8:39 AM, Szabo, Patrick (LNG-VIE) <patrick.szabo at lexisnexis.at<mailto:patrick.szabo at lexisnexis.at>> wrote:
If i understand you correctly you want to handle an exception that is thrown withing a thread in the main-thread right ?

You could just catch the exception within the thread and send a signal to the main-thread.


Von: pyqt-bounces at riverbankcomputing.com<mailto:pyqt-bounces at riverbankcomputing.com> [mailto:pyqt-bounces at riverbankcomputing.com<mailto:pyqt-bounces at riverbankcomputing.com>] Im Auftrag von José M. Rodriguez Bacallao
Gesendet: Dienstag, 18. Dezember 2012 14:34
An: PyQt Mailing List
Betreff: Re: [PyQt] QThreads and exceptions

anyone?

On Mon, Dec 17, 2012 at 3:53 PM, José M. Rodriguez Bacallao <jmrbcu at gmail.com<mailto:jmrbcu at gmail.com>> wrote:
how to catch an exception thrown from a QThread, if I use python threads, I can catch it but no from QThread.




. . . . . . . . . . . . . . . . . . . . . . . . . .

Ing. Patrick Szabo

Developer
LexisNexis

A-1030 Wien, Marxergasse 25



Patrick.Szabo at lexisnexis.at<mailto:Patrick.Szabo at lexisnexis.at>

Tel.: +43 1 53452 1573

Fax.: +43 1 534 52 146

. . . . . . . . . . . . . . . . . . . . . . . . . .






. . . . . . . . . . . . . . . . . . . . . . . . . .

Ing. Patrick Szabo

Developer

LexisNexis

A-1030 Wien, Marxergasse 25



Patrick.Szabo at lexisnexis.at<mailto:Patrick.Szabo at lexisnexis.at>

Tel.: +43 1 53452 1573

Fax.: +43 1 534 52 146

. . . . . . . . . . . . . . . . . . . . . . . . . .


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20121218/c50fd70c/attachment-0001.html>


More information about the PyQt mailing list