From 9f0270e0cb8fefa6f3e78119ecf33b6a27eb2c95 Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Wed, 27 Mar 2013 00:22:55 +0000 Subject: [PATCH] inprogress --- .../forester/archaeopteryx/tools/ImageLoader.java | 27 +++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java b/forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java index 7b51d56..6e6b4e0 100644 --- a/forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java +++ b/forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java @@ -25,6 +25,7 @@ package org.forester.archaeopteryx.tools; +import java.awt.color.CMMException; import java.awt.image.BufferedImage; import java.io.IOException; import java.net.MalformedURLException; @@ -52,6 +53,11 @@ public class ImageLoader implements Runnable { _tp = tp; } + @Override + public void run() { + load(); + } + private void load() { Hashtable image_map = null; if ( _tp.getImageMap() != null ) { @@ -90,12 +96,20 @@ public class ImageLoader implements Runnable { bi = ImageIO.read( uri.getValue().toURL() ); } catch ( final MalformedURLException e ) { - AptxUtil.printWarningMessage( Constants.PRG_NAME, "\"" + uri.getValue() - + "\": Malformed URL Exception: " + e.getLocalizedMessage() ); + AptxUtil.printWarningMessage( Constants.PRG_NAME, + "could not load image from \"" + uri.getValue() + + "\": Malformed URL Exception: " + + e.getLocalizedMessage() ); } catch ( final IOException e ) { - AptxUtil.printWarningMessage( Constants.PRG_NAME, "\"" + uri.getValue() - + "\": IO Exception: " + e.getLocalizedMessage() ); + AptxUtil.printWarningMessage( Constants.PRG_NAME, + "could not load image from \"" + uri.getValue() + + "\": IO Exception: " + e.getLocalizedMessage() ); + } + catch ( final CMMException e ) { + AptxUtil.printWarningMessage( Constants.PRG_NAME, + "could not load image from \"" + uri.getValue() + + "\": CMMException: " + e.getLocalizedMessage() ); } if ( bi != null ) { image_map.put( uri_str, bi ); @@ -110,9 +124,4 @@ public class ImageLoader implements Runnable { } } } - - @Override - public void run() { - load(); - } } -- 1.7.10.2