[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QThreads and exceptions
From:       "Szabo, Patrick (LNG-VIE)" <patrick.szabo () lexisnexis ! at>
Date:       2012-12-18 13:56:52
Message-ID: 28ADE8319ADAF046873DD53E3D73E91F02301D () LNGVIEEXCP003 ! legal ! regn ! net
[Download RAW message or body]

[Attachment #2 (text/plain)]

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@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@lexisnexis.at<mailto:patrick.szabo@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@riverbankcomputing.com<mailto:pyqt-bounces@riverbankcomputing.com> \
[mailto:pyqt-bounces@riverbankcomputing.com<mailto:pyqt-bounces@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@gmail.com<mailto:jmrbcu@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@lexisnexis.at<mailto:Patrick.Szabo@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@lexisnexis.at<mailto:Patrick.Szabo@lexisnexis.at>

Tel.: +43 1 53452 1573

Fax.: +43 1 534 52 146

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


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<!-- Template generated by Exclaimer Mail Disclaimers on 02:56:53 Dienstag, 18 \
Dezember 2012 --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.318157f4-bd21-417c-a638-b45fcf5c4151 {
	MARGIN: 0cm 0cm 0pt
}
LI.318157f4-bd21-417c-a638-b45fcf5c4151 {
	MARGIN: 0cm 0cm 0pt
}
DIV.318157f4-bd21-417c-a638-b45fcf5c4151 {
	MARGIN: 0cm 0cm 0pt
}
TABLE.318157f4-bd21-417c-a638-b45fcf5c4151Table {
	MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
	page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Sprechblasentext Zchn";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.E-MailFormatvorlage18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.SprechblasentextZchn
	{mso-style-name:"Sprechblasentext Zchn";
	mso-style-priority:99;
	mso-style-link:Sprechblasentext;
	font-family:"Tahoma","sans-serif";
	mso-fareast-language:DE-AT;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE-AT" link="blue" vlink="purple">
<p class="318157f4-bd21-417c-a638-b45fcf5c4151"></p>
<div class="WordSection1">
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">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. <o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><b><span lang="DE" \
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span \
lang="DE" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> \
José M. Rodriguez Bacallao [mailto:jmrbcu@gmail.com] <br>
<b>Gesendet:</b> Dienstag, 18. Dezember 2012 14:53<br>
<b>An:</b> Szabo, Patrick (LNG-VIE)<br>
<b>Cc:</b> PyQt Mailing List<br>
<b>Betreff:</b> Re: [PyQt] QThreads and exceptions<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">no, what I want is to catch the exception in the main \
thread!<o:p></o:p></p> </div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Tue, Dec 18, 2012 at 8:39 AM, Szabo, Patrick (LNG-VIE) &lt;<a \
href="mailto:patrick.szabo@lexisnexis.at" \
target="_blank">patrick.szabo@lexisnexis.at</a>&gt; wrote:<o:p></o:p></p> <div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">If \
i understand you correctly you want to handle an exception that is thrown withing a \
thread in  the main-thread right ?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
 <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">You \
could just catch the exception within the thread and send a signal to the \
main-thread.</span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
 <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p> <p \
class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span \
lang="DE" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span \
lang="DE" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
 <a href="mailto:pyqt-bounces@riverbankcomputing.com" \
target="_blank">pyqt-bounces@riverbankcomputing.com</a> [mailto:<a \
href="mailto:pyqt-bounces@riverbankcomputing.com" \
target="_blank">pyqt-bounces@riverbankcomputing.com</a>] <b>Im Auftrag von </b>José \
M. Rodriguez Bacallao<br> <b>Gesendet:</b> Dienstag, 18. Dezember 2012 14:34<br>
<b>An:</b> PyQt Mailing List<br>
<b>Betreff:</b> Re: [PyQt] QThreads and exceptions</span><o:p></o:p></p>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p> \
<div> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">anyone?&nbsp;<o:p></o:p></p>
 </div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;margin-bottom:12.0pt">&nbsp;<o:p></o:p></p> <div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On \
Mon, Dec 17, 2012 at 3:53 PM, José M. Rodriguez Bacallao &lt;<a \
href="mailto:jmrbcu@gmail.com" target="_blank">jmrbcu@gmail.com</a>&gt; \
wrote:<o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">how to catch an exception \
thrown from a QThread, if I use python threads, I can catch it but no from QThread. \
<o:p></o:p></p> </div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p> \
</div> </div>
</div>
<p>&nbsp;<o:p></o:p></p>
<p>. . . . . . . . . . . . . . . . . . . . . . . . . .<o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:red">Ing. \
Patrick</span><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:red">&nbsp;</span><span \
style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:red">Szabo</span><span \
style="color:red"><o:p></o:p></span></p> <p><span \
style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:red">Developer</span><span \
style="color:red"><o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#7D7D7D">LexisNexis</span>
 <o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#7D7D7D">A-1030 \
Wien, Marxergasse 25</span><o:p></o:p></p> <p>&nbsp;<o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black"><a \
href="mailto:Patrick.Szabo@lexisnexis.at" target="_blank" title="Click to send email \
to Szabo, Patrick (LNG-VIE)"><span \
style="color:black">Patrick.Szabo@lexisnexis.at</span></a></span><o:p></o:p></p> \
<p><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#7D7D7D">Tel.: \
&#43;43 1 53452 1573</span><span style="color:red"><o:p></o:p></span></p> <p><span \
style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#7D7D7D">Fax.: \
&#43;43 1 534 52 146</span><span style="color:red"><o:p></o:p></span></p> <p>. . . . \
. . . . . . . . . . . . . . . . . . . . . .<o:p></o:p></p> <p>&nbsp;<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
<p></p>
<p class="318157f4-bd21-417c-a638-b45fcf5c4151"><span lang="DE-AT"></span>&nbsp;</p>
<p class="318157f4-bd21-417c-a638-b45fcf5c4151"><span lang="DE-AT">. . . . . . . . . \
. . . . . . . . . . . . . . . . .</p> </span><font color="#ff0000"><font \
color="#ff0000"><font color="#ff0000"> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"><span style="font-family:Calibri; \
font-size:x-small; ">Ing. </span><span style="font-family:Calibri; font-size:x-small; \
">Patrick</span><font size="2" face="Calibri">&nbsp;</font><span \
style="font-family:Calibri; font-size:x-small; ">Szabo</span></p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"><span style="font-family:Calibri; \
font-size:x-small; color: #000000; ">Developer</span></p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"></font></font></font><font \
color="#7d7d7d" size="2" face="Calibri">LexisNexis</font></p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"><span style="font-family:Calibri; \
font-size:x-small; color: #7D7D7D; ">A-1030 Wien, Marxergasse 25</span></p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"><font color="#7d7d7d" size="2" \
face="Calibri"></font>&nbsp;</p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"><span style="font-family:Calibri; \
font-size:x-small; color: Black; "><span style="font-family:Calibri; \
font-size:x-small; color: Black; "><a href="mailto:Patrick.Szabo@lexisnexis.at" \
title="Click to send email to Szabo, Patrick (LNG-VIE)" target=""><span \
style="font-family:Calibri; font-size:x-small; color: Black; \
">Patrick.Szabo@lexisnexis.at</span></a></span></span></p> <font color="#ff0000">
<p class="318157f4-bd21-417c-a638-b45fcf5c4151"><span style="font-family:Calibri; \
font-size:x-small; color: #7D7D7D; ">Tel.: &#43;43 1 53452 1573</span></p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"><span style="font-family:Calibri; \
font-size:x-small; color: #7D7D7D; ">Fax.: &#43;43 1 534 52 146</span></p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"><span style="font-family:Calibri; \
font-size:x-small; color: #7D7D7D; "></span></p> </font>
<p class="318157f4-bd21-417c-a638-b45fcf5c4151"><span lang="DE-AT">. . . . . . . . . \
. . . . . . . . . . . . . . . . .</span></p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"><span lang="DE-AT"></span>&nbsp;</p> <p \
class="318157f4-bd21-417c-a638-b45fcf5c4151"></p> <p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</body>
</html>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
--===============6108525027237136332==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic