FTP error when no network

ajk

Active Member
Licensed User
Longtime User
When I turn off wifi and gsm (there are really no network access),
I get an error:

java.net.UnknownHostException:Unable to resolve host "lexa-main-no-ip.baz": No address asscociated with hostname.

It is obwious. But how to cath this?

PS with wifi or gsm turned on FTP (lib 1.3) works perfect
 
Last edited:

ajk

Active Member
Licensed User
Longtime User
Yes, it is false and I can see it in device log. But my question is: "How to avoid the message pop up to user"?
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
Try:
B4X:
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)

    If Success = False Then
        Return
    Else
        'place your code here after successful upload
    End If
End Sub
 
Upvote 0
Top