FTP Erro not trappable

Vinians2006

Active Member
Licensed User
Longtime User
Im creating an application that uses FTP. When the FTP is on all works nicely but when its fail the Try Catch block dont catch the error.
See:
B4X:
'its inicialize de FTP object
mFTP.Initialize("FTP", Geral.FTP_HOST, 21, Geral.FTP_USUARIO, Geral.FTP_SENHA)
Try
mFTP.DownloadFile(Geral.FTP_PASTA & "/thefile.txt", _
            True, _
            Geral.FILE_PATH, _
            "thefile.txt")
Catch
   MsgBox("This should display a message but its dont even if download fail...")
End Try
I tryed to use FTP.Initialized() but not worked this function returns TRUE even if initialization fail. I really need to cath this error....
 
Top