Hi,
I would like to delete the message "Connection timeout expired" when the IP address is not correct ... or catch other error,
How to do that ?
I try this but without success ...
try
ScSFTPClient.Initialize;
except
on e: EScError do
begin
AddDebugString('Error : ' + e.Message);
end;
on e: EScSFTPError do
begin
AddDebugString('Error : ' + e.Message);
end;
end;
Thanks.
How to catch exception from TScSFTPClient or TScSSHClient
I create my own Exception handler ...
But, with the SocketException the program freeze 10 seconds and I can not change this timeout, also the timeout in SSHClient or SSHShell does nothing ...
procedure TRootForm.MyExceptionHandler(Sender : TObject; E : Exception);
begin
if ((E.ClassName = 'SocketException') or (E.ClassName = 'EScError') or (E.ClassName = 'EScSFTPError')) then
begin ...
But, with the SocketException the program freeze 10 seconds and I can not change this timeout, also the timeout in SSHClient or SSHShell does nothing ...
procedure TRootForm.MyExceptionHandler(Sender : TObject; E : Exception);
begin
if ((E.ClassName = 'SocketException') or (E.ClassName = 'EScError') or (E.ClassName = 'EScSFTPError')) then
begin ...