[Twisted-Python] Proposal: changes to reactor.clientTCP
tv at twistedmatrix.com
Sat Jun 22 17:57:31 EDT 2002
Glyph Lefkowitz <glyph at twistedmatrix.com> writes:
> 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
> Balancing this with the need not to piss people off is difficult :-). I can't
> think of a way to say "DON'T USE .platformError UNLESS YOU REALLY NEED IT,
> WHICH YOU DON'T" without making everybody read the documentation, which they
> won't anyway. I can imagine many programs made non-portable by someone looking
> for the answer to the question "how do I find the errno of what happened"
> rather than the correct question "how do I handle a connection error".
Don't document platformError outside the source code, and
there point out that it should not be used, and point to the
real solution. This is a social problem, and technical methods
will not be able to solve it.
And, if you want me to write code using the high-level API, the
high-level API needs to be able to tell me atleast
1) if the error is local or remote
2) if the error is temporary or permanent
3) how to report the error to the user without losing information
More information about the Twisted-Python