From: Niki Roo Date: Sun, 12 Aug 2018 20:35:33 +0000 (+0200) Subject: Allow IOError when saving CBZ X-Git-Tag: fanfix-1.8.1~12 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=77fea1c0131fd9723ef06e65ab566e380fc7c876;p=fanfix.git Allow IOError when saving CBZ --- diff --git a/src/be/nikiroo/fanfix/output/Text.java b/src/be/nikiroo/fanfix/output/Text.java index b45a512..4a45e54 100644 --- a/src/be/nikiroo/fanfix/output/Text.java +++ b/src/be/nikiroo/fanfix/output/Text.java @@ -105,8 +105,13 @@ class Text extends BasicOutput { protected void writeParagraphHeader(Paragraph para) throws IOException { if (para.getType() == ParagraphType.IMAGE) { File file = new File(targetDir, getCurrentImageBestName(true)); - Instance.getCache().saveAsImage(para.getContentImage(), file, - nextParaIsCover); + try { + Instance.getCache().saveAsImage(para.getContentImage(), file, + nextParaIsCover); + } catch (IOException e) { + Instance.getTraceHandler().error( + new IOException("Cannot save an image", e)); + } } nextParaIsCover = false;