Hello,
My app is working on a requesting data from a webserver with http request and return json as response.
Some crash reports show this error :
Line that is equal to main.java 1311 is :
As I can understand from the percentage of error ( it is around %5 of all users ) most of the time there is no problem , but I want to fix this. If the job is success , I must have get the json also because it is impossible to get a blank response from the server. This error happens when the received response is not json so to fix this ,
Can I use for example try catch for the above code and if stg is catched repeat this job ?
TY
My app is working on a requesting data from a webserver with http request and return json as response.
Some crash reports show this error :
Exception java.lang.RuntimeException: JSON Object expected.
anywheresoftware.b4a.objects.collections.JSONParser.NextObject (JSONParser.java:50)
ct.canlidoviz.main._jobdone (main.java:1311)
Line that is equal to main.java 1311 is :
B4X:
If Job.JobName="songrafik" Then
If Job.Success = True Then
Log(Job.GetString)
Dim parser As JSONParser
parser.Initialize(Job.GetString)
As I can understand from the percentage of error ( it is around %5 of all users ) most of the time there is no problem , but I want to fix this. If the job is success , I must have get the json also because it is impossible to get a blank response from the server. This error happens when the received response is not json so to fix this ,
Can I use for example try catch for the above code and if stg is catched repeat this job ?
TY