updates for 0.9.4
[debian/openrocket] / src / net / sf / openrocket / gui / main / ComponentIcons.java
index 0c140b26bad9a01234675f00b06bbc9cc9228e19..d1e47a30f1db929223d5df3afd89b7b9823d2b44 100644 (file)
@@ -86,7 +86,7 @@ public class ComponentIcons {
        private static ImageIcon loadSmall(String file, String desc) {
                URL url = ClassLoader.getSystemResource(file);
                if (url==null) {
-               System.err.println("ERROR:  Couldn't find file: " + file);
+               ExceptionHandler.handleErrorCondition("ERROR:  Couldn't find file: " + file);
                        return null;
                }
                return new ImageIcon(url, desc);
@@ -103,8 +103,7 @@ public class ComponentIcons {
                                bi = ImageIO.read(url);
                                bi2 = ImageIO.read(url);   //  How the fsck can one duplicate a BufferedImage???
                        } catch (IOException e) {
-                               System.err.println("ERROR:  Couldn't read file: "+file);
-                               e.printStackTrace();
+                               ExceptionHandler.handleErrorCondition("ERROR:  Couldn't read file: "+file, e);
                        return new ImageIcon[]{null,null};
                        }
                        
@@ -138,7 +137,7 @@ public class ComponentIcons {
                
                return icons;
            } else {
-               System.err.println("ERROR:  Couldn't find file: " + file);
+               ExceptionHandler.handleErrorCondition("ERROR:  Couldn't find file: " + file);
                return new ImageIcon[]{null,null};
            }
        }