When executing code:
for (int j = a ; j <= b; j++) { try { Document doc = Jsoup.connect("какой-то URL" + j).ignoreHttpErrors(true).timeout(1000 * 5).get(); } } Sometimes a SocketTimeoutException error pops up.
Can I process it in such a way that the cycle continues to work from the point of error? Is my implementation correct?
catch (SocketTimeoutException ste) { System.out.println("Не удаётся подключиться. Пробуем снова"); j--; continue; }