[Twisted-Python] Proposal: changes to reactor.clientTCP
andrew-twisted at puzzling.org
Sat Jun 22 00:00:39 EDT 2002
On Fri, Jun 21, 2002 at 06:59:23PM -0500, Glyph Lefkowitz wrote:
> From: Tommi Virtanen <tv at twistedmatrix.com>
> Subject: Re: [Twisted-Python] Proposal: changes to reactor.clientTCP
> Date: 21 Jun 2002 22:04:08 +0300
> > But please do _not_ loose any information in the translation. Say people
> > shouldn't look at the error objects errno attribute to decide what to do, as
> > not all platforms provide it. But don't hide the actual error.
> Upon consideration I strongly agree that no information should be lost.
> So, let's have such a high-level error, and a .platformError attribute on the
> connection error object which is an object specific to the "OS" that you're
> running under. On POSIX this will be (or contain) an errno error code, but on
> Jython and elsewhere it will be whatever's appropriate. Does that work for
I don't care about the errno, but I do think that the corresponding error
string (e.g. 'No route to host') should be available, so that you have
something meaningful to display to the user, write in error logs, etc. Is
it guaranteed that a socket.error's .args attribute will always be a 2-tuple
of (errno, description) on all platforms? If so, I think that would make
sense as the .platformError.
More information about the Twisted-Python