[seam-commits] Seam SVN: r7524 - trunk/ui/src/main/java/org/jboss/seam/ui/graphicImage.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Mar 11 06:36:34 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-03-11 06:36:34 -0400 (Tue, 11 Mar 2008)
New Revision: 7524

Modified:
   trunk/ui/src/main/java/org/jboss/seam/ui/graphicImage/Image.java
Log:
Better exception

Modified: trunk/ui/src/main/java/org/jboss/seam/ui/graphicImage/Image.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/graphicImage/Image.java	2008-03-10 23:13:31 UTC (rev 7523)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/graphicImage/Image.java	2008-03-11 10:36:34 UTC (rev 7524)
@@ -437,10 +437,14 @@
 
    private void readImage(InputStream inputStream) throws IOException
    {
+      if (inputStream == null)
+      {
+         throw new IllegalArgumentException("Image pointed to must exist (input stream must not be null)");
+      }
       ImageInputStream stream = ImageIO.createImageInputStream(inputStream);
       if (stream == null)
       {
-         throw new IllegalArgumentException("stream == null!");
+         throw new IllegalArgumentException("Error creating image input stream from image");
       }
 
       Iterator iter = ImageIO.getImageReaders(stream);




More information about the seam-commits mailing list