<br><br><div class="gmail_quote">On Thu, Jun 14, 2012 at 7:38 PM, Martin <span dir="ltr">&lt;<a href="mailto:martin@webscio.net" target="_blank">martin@webscio.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, thanks for your reply.<br>
<br>
Indeed, the ReconnectingClientFactory is being sent the Failure object to<br>
<div class="im"><br>
def clientConnectionLost(self, connector, reason):<br>
         log.msg(&#39;Lost connection. Reason: %s&#39; % reason)<br>
</div>         protocol.ReconnectingClientFactory.clientConnectionLost(self,<br>
connector, reason)<br>
<br>
where &quot;reason&quot; is the Failure object that is &quot;unhandled&quot;. is there<br>
anything I could do to it there to make it handled?<br>
<br>
Also, the documentation in<br>
<a href="http://twistedmatrix.com/documents/current/core/howto/defer.html" target="_blank">http://twistedmatrix.com/documents/current/core/howto/defer.html</a> says<br>
that one can do d.addErrback(err.log) to deal with unhandled errors, but<br>
what is d?<br>
<br>
In general, I&#39;m not doing anything special.. I&#39;m creating a<br>
ReconnectingClientFactory and connecting it to a server..<br>
f = MyReconnectingClientFactory(..)<br>
reactor.connectSSL(url, port, f, ssl.ClientContextFactory())<br>
reactor.run()<br>
<br>
Basically it. Any thoughts? Thanks a lot!<br>
<div class="HOEnZb"><div class="h5">&gt; On Jun 11, 2012, at 8:01 AM, Martin wrote:<br>
&gt;<br>
&gt;&gt; Hi there,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve been looking around for a solution for several hours now, and maybe<br>
&gt;&gt; I&#39;m just missing something..<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve a factory that implements protocol.ReconnectingClientFactory which<br>
&gt;&gt; works just fine, however, whenever the program ends running, I get a<br>
&gt;&gt; bunch of Unhandled error in Deferred messages in my log for each<br>
&gt;&gt; disconnection that occurred during runtime, such as Failure:<br>
&gt;&gt; twisted.internet.error.ConnectionLost: ...<br>
&gt;&gt;<br>
&gt;&gt; Is there any way I could somehow &quot;handle&quot; these during runtime, so that<br>
&gt;&gt; my log wouldn&#39;t be spammed with this at the end.. (or avoid it being<br>
&gt;&gt; spammed somehow..)<br>
&gt; These messages are coming from some code which is issuing Deferreds, not from ReconnectingClientFactory.  You need to add an errback to those Deferreds in your application code.  There&#39;s no way to write a catch-all, just like there&#39;s no way to write a catch-all that can stop exceptions from being raised in basic Python.<br>

&gt;<br>
&gt; I can&#39;t say more without a code example, preferably a&lt;<a href="http://sscce.org/" target="_blank">http://sscce.org/</a>&gt;.<br>
&gt;<br>
&gt; -glyph<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Twisted-Python mailing list<br>
&gt; <a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
&gt; <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br><div>Hi Martin</div><div><br></div><div>  d refers to a defer object. </div>