From 77fea1c0131fd9723ef06e65ab566e380fc7c876 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 12 Aug 2018 22:35:33 +0200 Subject: [PATCH] Allow IOError when saving CBZ --- src/be/nikiroo/fanfix/output/Text.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; -- 2.27.0