in droid how do i have an exception get not only caught
But completely ignored so th开发者_StackOverflow中文版at the code keeps continuing from where the exception was thrown? I thought it was simply having the catch method empty.. but my code does not seem to be continuing, just doing nothing... but not crashing.
Make sure your catch block is close enough to the throwing point that no needed lines get skipped. When you catch an exception the execution resumes after the catch block, it does not jump back up to where the exception was thrown.
If you catch the exception in a loop then you can continue to the next iteration by catching the exception inside the loop. If this is not in the loop then the code will exit at that point. You can't expect it to continue because the exception means something went wrong.
Do you have a code example, the Try catch should be working.
精彩评论