Have you tried calling GetLastError or WSAGetLastError ?
--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
----- Original Message -----
From: "Anton Sviridov" <an...@rambler.ru>
To: <twsocket@elists.org>
Sent: Thursday, April 29, 2010 2:20 PM
Subject: [twsocket] FTPCli error handling
Hello all,
it's me again and again with a question about FTPCli.
Current manner of reporting local errors is to set code 550 with an
explaining message and call TriggerRequestDone. But I find it very
confusing: for example, when trying to GET some file or directory listing
we could receive "true FTP response" 550 if the requested file doesn't
exist (so we should give up) as well as "ICS response" if connection
couldn't be established (so we should retry) or there was error creating
local file stream (so we should check HDD free space). And there's no way
to distinguish these cases (except checking FLastResponse string, but I
consider it rather unconvenient).
So I think something is needed to be done to differentiate local problems
of remote ones. I'd prefer changing 550 code to some another value unused
by FTP servers (maybe even over 600 to avoid intersections for sure) but
the ICS policy is NOT BREAK existing code, so maybe some flag like
FLocalErrorHappened: Boolean will solve the problem?
If you reject the idea please explain me how to deal with this response
mess.
--
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be