Skip to content

Commit b02994d

Browse files
committed
完善异常上抛机制 [skip ci]
1 parent 09471dd commit b02994d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/jmcomic/jm_downloader.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ def raise_if_have_exception(self):
287287
if self.is_empty_download_failed:
288288
return
289289
ExceptionTool.raises(
290-
f'部分下载失败: 有{len(self.download_failed_photo)}个章节下载失败, {len(self.download_failed_image)}个图片下载失败',
290+
f'部分下载失败: 有{len(self.download_failed_photo)}个章节下载失败, {len(self.download_failed_image)}个图片下载失败。\n' +
291+
f'失败章节IDs: {[photo.id for photo, _ in self.download_failed_photo][:5]}{"..." if len(self.download_failed_photo) > 5 else ""}\n' +
292+
f'失败图片URLs: {[image.download_url for image, _ in self.download_failed_image][:5]}{"..." if len(self.download_failed_image) > 5 else ""}',
291293
{'downloader': self},
292294
PartialDownloadFailedException,
293295
)

0 commit comments

Comments
 (0)