Android Question try & catch problem

tufanv

Expert
Licensed User
Longtime User
Hello,

I am using a remote mysql server in my app.
Some times within a for next , altough i limit the operation to size of the records, i get index out of bounds error . if it always give the problem i can solve it but it only gives the error 1 in 4-5 tests. so I cant solve the problem. I tried to use try catch to eliminite the error for the user but no luck. Is there any way to avoid error msg to appear ?

ty
 

LucaMs

Expert
Licensed User
Longtime User
Hard to undertand without seeing the code.

As a hypothesis, since the problem does not always occur and that the data is remote, I would say that you have not received the data, you have not waited for the complete "download" (httpjob, I guess).

You should eliminate the problem, not the message.

However, you could try to use the SQL Transactions to handle the error
 
Upvote 0
Top