Version 4.4.1 nikiroo-utils-4.4.1
authorNiki Roo <niki@nikiroo.be>
Sun, 12 Aug 2018 20:47:37 +0000 (22:47 +0200)
committerNiki Roo <niki@nikiroo.be>
Sun, 12 Aug 2018 20:47:37 +0000 (22:47 +0200)
src/be/nikiroo/utils/ui/ImageUtilsAwt.java

index 3acbe55f9c23ad482d9ecc533bcd0e138fa8c92d..148f8f57451141805c508de08e8254b0f3e2d407 100644 (file)
@@ -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");