Allow IOError when saving CBZ
[fanfix.git] / src / be / nikiroo / fanfix / output / Text.java
index b45a51284bf913501bb0fa7fefd4c12a371c8bc8..4a45e5430fba9465b1e92a590bcae9cc18b28360 100644 (file)
@@ -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;