indy - Delphi connection test with TIdFTP -
on program i'm using code:
if idftp1.connect = true begin //makes stuff end else begin showmessage('you got move jagger.'); end;
if not connected see error
socket error #11001
host not found
to avoid this, thought use code see above having error when use idftp1.connect = true
.
what do?
connect()
not return boolean if fails. raises exception instead:
try idftp1.connect; try //makes stuff idftp1.disconnect; end; except showmessage('you got move jagger.'); end;
Comments
Post a Comment