<div>
<div>
<span>Based on the follow-up emails, I'll have an Exception raised when the connection closes after start-ok in 0.9.6.</span></div><div><span><br></span></div><div><span>Gavin</span></div><div><span class="Apple-style-span" style="color: rgb(160, 160, 160); "><br></span></div><div><span class="Apple-style-span" style="color: rgb(160, 160, 160); ">On Thursday, May 5, 2011 at 11:17 AM, Brandon Craig Rhodes wrote:</span></div><div>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div>When a error occurs while connecting in Pika 0.9.5, I have to go log on<br>to my RabbitMQ server and look at its logs to discover what happened -<br>the IOLoop in the local program simply returns after three seconds and<br>my next piece of code breaks because the `on_open_callback` callback<br>that I am passing to my `SelectConnection` never gets called when the<br>username and password are wrong.<br><br>How am I supposed to intercept this condition so that I can return an<br>error message to my user? I tried registering a callback with the<br>`connection.add_on_close_callback()` method but, sensibly enough, it<br>never gets called because this is not really a connection-close, but a<br>connection not getting established in the first place. I have looked<br>around for some sort of a `connection.add_on_error_callback()` or some<br>similar sort of facility, but cannot find one.<br><br>How do I catch and handle asynchronous errors?<br><br>Thanks for ANY help that you guys can offer - and thanks, Gavin, for<br>writing such an important part of the modern Python ecosystem!<br><br>-- <br>Brandon Craig Rhodes brandon@rhodesmill.org <a href="http://rhodesmill.org/brandon">http://rhodesmill.org/brandon</a><br>_______________________________________________<br>rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br></div></div></span>
</blockquote>
<div>
<br>
</div>
</div>
</div>