From: Niki Roo Date: Sun, 12 Aug 2018 20:47:37 +0000 (+0200) Subject: Version 4.4.1 X-Git-Tag: fanfix-swing-0.0.1~21^2~191 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=354666447f9c71a7fb2e15d9c50ed62ce27d7108;p=fanfix-swing.git Version 4.4.1 --- 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");