Hi, On Wed, 13 Mar 2019 at 11:21, Chris Withers <ch...@withers.org> wrote: > > Hi All, > > Unless I'm missing something, Deferred.addTimeout is really unhelpful in > terms on providing context about *what* timed out. > TimeoutError(<some number>, 'Deferred') just isn't that useful. > > How come addTimeout doesn't let you specify a textual reason, or > otherwise provide some context about the timeout? > > Am I missing something obvious here?
I don't know what kind of context do you need :) You can add your own errback and add your extra error handling there. There is also onTimeoutCancel argument. If there is anything missing from the API, feel free to send a pull request in GitHub. I guess that it was implemented in this way as the current implementation serves the purpose for the people who have added the support for timeout. Regards, Adi > Chris > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python -- Adi Roiban _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python