[Pixelle-commit] SF.net SVN: pixelle: [137] trunk/pixelle/src/com/mebigfatguy/pixelle/ PixelleEvalF
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-07-04 18:54:50
|
Revision: 137
http://pixelle.svn.sourceforge.net/pixelle/?rev=137&view=rev
Author: dbrosius
Date: 2008-07-04 11:54:50 -0700 (Fri, 04 Jul 2008)
Log Message:
-----------
better exceptions
Modified Paths:
--------------
trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleEvalFactory.java
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleEvalFactory.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleEvalFactory.java 2008-07-04 18:52:11 UTC (rev 136)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleEvalFactory.java 2008-07-04 18:54:50 UTC (rev 137)
@@ -56,7 +56,7 @@
}
/**
- * factory method for creating an pixel evaluator for the type of image that is
+ * factory method for creating a pixel evaluator for the type of image that is
* passed in.
*
* @param image the image that will need to be evaluated
@@ -72,10 +72,10 @@
return new PixelleEval4ByteABGR(image, ioobOption, coobOption);
case BufferedImage.TYPE_BYTE_BINARY:
- break;
+ throw new IllegalArgumentException("Image type: " + image.getType() + " (Byte Binary) is not supported yet.");
case BufferedImage.TYPE_BYTE_INDEXED:
- break;
+ throw new IllegalArgumentException("Image type: " + image.getType() + " (Byte Indexed) is not supported yet.");
case BufferedImage.TYPE_BYTE_GRAY:
return new PixelleEvalByteGray(image, ioobOption, coobOption);
@@ -88,6 +88,9 @@
case BufferedImage.TYPE_INT_RGB:
return new PixelleEvalIntRGB(image, ioobOption, coobOption);
+
+ case BufferedImage.TYPE_CUSTOM:
+ throw new IllegalArgumentException("Image type: " + image.getType() + " (Custom) is not supported yet.");
}
throw new IllegalArgumentException("Unknown image type: " + image.getType());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|