From 354666447f9c71a7fb2e15d9c50ed62ce27d7108 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 12 Aug 2018 22:47:37 +0200 Subject: [PATCH] Version 4.4.1 --- src/be/nikiroo/utils/ui/ImageUtilsAwt.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/be/nikiroo/utils/ui/ImageUtilsAwt.java b/src/be/nikiroo/utils/ui/ImageUtilsAwt.java index 3acbe55f..148f8f57 100644 --- a/src/be/nikiroo/utils/ui/ImageUtilsAwt.java +++ b/src/be/nikiroo/utils/ui/ImageUtilsAwt.java @@ -80,7 +80,15 @@ public class ImageUtilsAwt extends ImageUtils { } in.reset(); - BufferedImage image = ImageIO.read(in); + BufferedImage image; + try { + image = ImageIO.read(in); + } catch (IllegalArgumentException e) { + throw e; + } catch (Exception e) { + throw new IOException("Undocumented exception occured, " + + "converting to IOException", e); + } if (image == null) { throw new IOException("Failed to convert input to image"); -- 2.27.0