Re: [Twisted-Python] Trapping exceptions in Deferred

2015-05-22 Thread Mashiat Sarker Shakkhar
On Tue, May 12, 2015 at 3:31 PM, Christopher Armstrong < ra...@twistedmatrix.com> wrote: > [...] > Your code example is printing the error message and traceback _before_ you > trap the failure. Are those print statements going to your logs? Could that > be causing confusion? > To sum up the discu

Re: [Twisted-Python] Trapping exceptions in Deferred

2015-05-12 Thread Christopher Armstrong
> On May 12, 2015, at 1:25 PM, Mashiat Sarker Shakkhar > wrote: > > On Tue, May 12, 2015 at 1:38 PM, Louis D. Burr > wrote: > Hi Mashiat, > > [...] > > Thanks for providing the example. Your code as presented here catches both > TimeoutError and ResponseNeverRe

Re: [Twisted-Python] Trapping exceptions in Deferred

2015-05-12 Thread Mashiat Sarker Shakkhar
On Tue, May 12, 2015 at 1:38 PM, Louis D. Burr wrote: > Hi Mashiat, > [...] > Thanks for providing the example. Your code as presented here catches > both TimeoutError and ResponseNeverReceived, so I am not sure why you think > it isn’t working. What are you seeing that indicates that the >

Re: [Twisted-Python] Trapping exceptions in Deferred

2015-05-12 Thread Louis D. Burr
Hi Mashiat, > On May 12, 2015, at 11:48 AM, Mashiat Sarker Shakkhar > wrote: > [...] > Alright. Below you can find a code snippet that is similar to my actual code. > But my question is a little more generic - how do I catch exceptions that are > encapsulated in a failure? If the actual excep

Re: [Twisted-Python] Trapping exceptions in Deferred

2015-05-12 Thread Mashiat Sarker Shakkhar
On Tue, May 12, 2015 at 11:33 AM, Louis D. Burr wrote: > > Hi Mashiat, [...] > This code sample does not indicate that you have actually assigned log_ignore_network_errors as an errback on a Deferred anywhere. If you can provide a working code example that demonstrates your issue, it will be ea

Re: [Twisted-Python] Trapping exceptions in Deferred

2015-05-12 Thread Louis D. Burr
Hi Mashiat, > On May 12, 2015, at 9:53 AM, Mashiat Sarker Shakkhar > wrote: > > Hi > > If I want to trap a certain type of exception in a deferred call, how do I > specify it? For example, I see a failure like this: > > [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] > [>] > [H

[Twisted-Python] Trapping exceptions in Deferred

2015-05-12 Thread Mashiat Sarker Shakkhar
Hi If I want to trap a certain type of exception in a deferred call, how do I specify it? For example, I see a failure like this: [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] [>] [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] Traceback (most recent call last): [HTTP11Cl