B4J Question How Do I Catch the "java.net.SocketTimeoutException: timeout" Exception?

cklester

Well-Known Member
Licensed User
This is coming back to me often enough that I would like to catch it and work around it, if possible.

At the moment, it's coming from an HttpJob.Download() or HttpJob.PostString() call.

This doesn't work for me:

B4X:
            Try
                j.Download(URL)
            Catch
                Log("Download() exception: " & LastException.Message)
            End Try
 
Last edited:

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
The call actually happens inside the library so can't catch it BUT it will also not crash your app.

The best approach is to use the job.sucess or the job.statusCode
 
Upvote 1
Top