B billmoultrie Member Licensed User Longtime User Jul 3, 2014 #1 I get a java message that says : java.net.SocketTimeoutException: Read timed out This is correct as the IP address is not available. But is it possible to catch this message rather than just have a Java error. Like 'If Job.Success Then'
I get a java message that says : java.net.SocketTimeoutException: Read timed out This is correct as the IP address is not available. But is it possible to catch this message rather than just have a Java error. Like 'If Job.Success Then'
Erel B4X founder Staff member Licensed User Longtime User Jul 3, 2014 #2 Check Job.ErrorMessage (in JobDone). Upvote 0
B billmoultrie Member Licensed User Longtime User Jul 3, 2014 #3 Thanks. The top of JobDone is: Code: Copy Sub JobDone(Job As HttpJob) Log("Job done ") If Job.ErrorMessage Then Log(Job.ErrorMessage) End If If Job.Success Then Log(Job.GetString) Else Log(Job.ErrorMessage) End If The java error message is coming before entering this code, so it could be in HTTPutils2. The message is: java.net.SocketTimeoutException: Read timed out After 'jobdone' I get the java error message/ java.lang.RuntimeException: Cannot parse: java.net.SocketTimeoutException: Read timed out as Boolean Upvote 0
Thanks. The top of JobDone is: Code: Copy Sub JobDone(Job As HttpJob) Log("Job done ") If Job.ErrorMessage Then Log(Job.ErrorMessage) End If If Job.Success Then Log(Job.GetString) Else Log(Job.ErrorMessage) End If The java error message is coming before entering this code, so it could be in HTTPutils2. The message is: java.net.SocketTimeoutException: Read timed out After 'jobdone' I get the java error message/ java.lang.RuntimeException: Cannot parse: java.net.SocketTimeoutException: Read timed out as Boolean
Erel B4X founder Staff member Licensed User Longtime User Jul 4, 2014 #4 Job.ErrorMessage holds the error message. Your code treats it as a boolean value. Upvote 0
B billmoultrie Member Licensed User Longtime User Jul 4, 2014 #5 Of course you are right. I have realized that the java error does not matter. I can capture the error message and act on it. In B4A an error message would have stopped the program. Upvote 0
Of course you are right. I have realized that the java error does not matter. I can capture the error message and act on it. In B4A an error message would have stopped the program.