images: improved error logs on wrong image download in some use cases;

This commit is contained in:
Oleg Agafonov 2025-04-17 22:24:59 +04:00
parent c3b57f1973
commit 92c5a65124

View file

@ -940,14 +940,13 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
logger.warn(err);
}
}
} catch (AccessDeniedException e) {
incErrorCount();
logger.error("Can't access to files: " + card.getName() + "(" + card.getSet() + "). Try rebooting your system to remove the file lock.");
} catch (Exception e) {
incErrorCount();
logger.error("Unknown error: " + e.getMessage(), e);
} finally {
String sampleUrl = (urls == null ? "null" : urls.getDownloadList().stream().findFirst().orElse(null));
logger.error("Unknown error: " + e.getMessage() + ", sample url: " + sampleUrl, e);
}
synchronized (sync) {