xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gad...@apache.org
Subject svn commit: r1311522 - in /xmlgraphics/commons/trunk: ./ src/java/org/apache/xmlgraphics/image/codec/png/ src/java/org/apache/xmlgraphics/image/codec/tiff/ src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ src/java/org/apache/xmlgraphics/image...
Date Mon, 09 Apr 2012 23:37:59 GMT
Author: gadams
Date: Mon Apr  9 23:37:59 2012
New Revision: 1311522

URL: http://svn.apache.org/viewvc?rev=1311522&view=rev
Log:
Bugzilla #47175: Ensure that throwables have meaningful messages.

Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/RenderedImageCachableRed.java
    xmlgraphics/commons/trunk/src/resources/org/apache/xmlgraphics/image/codec/Messages.properties
    xmlgraphics/commons/trunk/status.xml

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java Mon Apr  9 23:37:59 2012
@@ -307,7 +307,7 @@ public abstract class PNGEncodeParam imp
         public void setBitDepth(int bitDepth) {
             if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4 &&
                 bitDepth != 8 && bitDepth != 16) {
-                throw new IllegalArgumentException();
+                throw new IllegalArgumentException(PropertyUtil.getString("PNGEncodeParam2"));
             }
             this.bitDepth = bitDepth;
             bitDepthSet = true;
@@ -391,7 +391,7 @@ public abstract class PNGEncodeParam imp
          */
         public void setBitShift(int bitShift) {
             if (bitShift < 0) {
-                throw new RuntimeException();
+                throw new IllegalArgumentException(PropertyUtil.getString("PNGEncodeParam25"));
             }
             this.bitShift = bitShift;
             bitShiftSet = true;
@@ -464,7 +464,7 @@ public abstract class PNGEncodeParam imp
          */
         public void setBitDepth(int bitDepth) {
             if (bitDepth != 8 && bitDepth != 16) {
-                throw new RuntimeException();
+                throw new IllegalArgumentException(PropertyUtil.getString("PNGEncodeParam26"));
             }
             this.bitDepth = bitDepth;
             bitDepthSet = true;
@@ -482,7 +482,7 @@ public abstract class PNGEncodeParam imp
          */
         public void setBackgroundRGB(int[] rgb) {
             if (rgb.length != 3) {
-                throw new RuntimeException();
+                throw new IllegalArgumentException(PropertyUtil.getString("PNGEncodeParam27"));
             }
             backgroundRGB = rgb;
             backgroundSet = true;
@@ -637,7 +637,7 @@ public abstract class PNGEncodeParam imp
      */
     public void setChromaticity(float[] chromaticity) {
         if (chromaticity.length != 8) {
-            throw new IllegalArgumentException();
+            throw new IllegalArgumentException(PropertyUtil.getString("PNGEncodeParam28"));
         }
         this.chromaticity = (float[])(chromaticity.clone());
         chromaticitySet = true;

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java Mon Apr  9 23:37:59 2012
@@ -39,6 +39,7 @@ import java.util.zip.Deflater;
 import java.util.zip.DeflaterOutputStream;
 
 import org.apache.xmlgraphics.image.codec.util.ImageEncoderImpl;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 
 class CRC {
 
@@ -895,7 +896,7 @@ public class PNGImageEncoder extends Ima
             // Ensure all channels have the same bit depth
             for (int i = 1; i < sampleSize.length; i++) {
                 if (sampleSize[i] != bitDepth) {
-                    throw new RuntimeException();
+                    throw new RuntimeException(PropertyUtil.getString("PNGImageEncoder0"));
                 }
             }
 
@@ -907,7 +908,7 @@ public class PNGImageEncoder extends Ima
             } else if (bitDepth > 8 && bitDepth < 16) {
                 bitDepth = 16;
             } else if (bitDepth > 16) {
-                throw new RuntimeException();
+                throw new RuntimeException(PropertyUtil.getString("PNGImageEncoder1"));
             }
         }
 
@@ -917,10 +918,10 @@ public class PNGImageEncoder extends Ima
         ColorModel colorModel = image.getColorModel();
         if (colorModel instanceof IndexColorModel) {
             if (bitDepth < 1 || bitDepth > 8) {
-                throw new RuntimeException();
+                throw new RuntimeException(PropertyUtil.getString("PNGImageEncoder2"));
             }
             if (sampleModel.getNumBands() != 1) {
-                throw new RuntimeException();
+                throw new RuntimeException(PropertyUtil.getString("PNGImageEncoder3"));
             }
 
             IndexColorModel icm = (IndexColorModel)colorModel;
@@ -970,7 +971,7 @@ public class PNGImageEncoder extends Ima
                 redPalette = greenPalette = bluePalette = alphaPalette = null;
                 this.colorType = PNG_COLOR_GRAY;
             } else {
-                throw new RuntimeException();
+                throw new RuntimeException(PropertyUtil.getString("PNGImageEncoder4"));
             }
         } else if (numBands == 1) {
             if (param == null) {

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java Mon Apr  9 23:37:59 2012
@@ -27,6 +27,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 import org.apache.xmlgraphics.image.codec.util.SeekableStream;
 
 /**
@@ -98,15 +99,13 @@ public class TIFFDirectory implements Se
         stream.seek(0L);
         int endian = stream.readUnsignedShort();
         if (!isValidEndianTag(endian)) {
-            throw new
-                IllegalArgumentException("TIFFDirectory1");
+            throw new IllegalArgumentException(PropertyUtil.getString("TIFFDirectory1"));
         }
         isBigEndian = (endian == 0x4d4d);
 
         int magic = readUnsignedShort(stream);
         if (magic != 42) {
-            throw new
-                IllegalArgumentException("TIFFDirectory2");
+            throw new IllegalArgumentException(PropertyUtil.getString("TIFFDirectory2"));
         }
 
         // Get the initial ifd offset as an unsigned int (using a long)
@@ -114,8 +113,7 @@ public class TIFFDirectory implements Se
 
         for (int i = 0; i < directory; i++) {
             if (ifd_offset == 0L) {
-                throw new
-                   IllegalArgumentException("TIFFDirectory3");
+                throw new IllegalArgumentException(PropertyUtil.getString("TIFFDirectory3"));
             }
 
             stream.seek(ifd_offset);
@@ -125,8 +123,7 @@ public class TIFFDirectory implements Se
             ifd_offset = readUnsignedInt(stream);
         }
         if (ifd_offset == 0L) {
-            throw new
-               IllegalArgumentException("TIFFDirectory3");
+            throw new IllegalArgumentException(PropertyUtil.getString("TIFFDirectory3"));
         }
 
         stream.seek(ifd_offset);
@@ -154,8 +151,7 @@ public class TIFFDirectory implements Se
         stream.seek(0L);
         int endian = stream.readUnsignedShort();
         if (!isValidEndianTag(endian)) {
-            throw new
-                IllegalArgumentException("TIFFDirectory1");
+            throw new IllegalArgumentException(PropertyUtil.getString("TIFFDirectory1"));
         }
         isBigEndian = (endian == 0x4d4d);
 
@@ -227,8 +223,7 @@ public class TIFFDirectory implements Se
                     stream.seek(value);
                 }
             } catch (ArrayIndexOutOfBoundsException ae) {
-
-                System.err.println(tag + " " + "TIFFDirectory4");
+                // System.err.println(tag + " " + "TIFFDirectory4"); TODO - log this message
                 // if the data type is unknown we should skip this TIFF Field
                 stream.seek(nextTagOffset);
                 continue;
@@ -338,8 +333,7 @@ public class TIFFDirectory implements Se
                 break;
 
             default:
-                System.err.println("TIFFDirectory0");
-                break;
+                throw new RuntimeException(PropertyUtil.getString("TIFFDirectory0"));
             }
 
             fields[i] = new TIFFField(tag, type, count, obj);
@@ -580,14 +574,12 @@ public class TIFFDirectory implements Se
         stream.seek(0L);
         int endian = stream.readUnsignedShort();
         if (!isValidEndianTag(endian)) {
-            throw new
-                IllegalArgumentException("TIFFDirectory1");
+            throw new IllegalArgumentException(PropertyUtil.getString("TIFFDirectory1"));
         }
         boolean isBigEndian = (endian == 0x4d4d);
         int magic = readUnsignedShort(stream, isBigEndian);
         if (magic != 42) {
-            throw new
-                IllegalArgumentException("TIFFDirectory2");
+            throw new IllegalArgumentException(PropertyUtil.getString("TIFFDirectory2"));
         }
 
         stream.seek(4L);

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java Mon Apr  9 23:37:59 2012
@@ -23,6 +23,7 @@ import java.util.Iterator;
 import java.util.zip.Deflater;
 
 import org.apache.xmlgraphics.image.codec.util.ImageEncodeParam;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 
 /**
  * An instance of <code>ImageEncodeParam</code> for encoding images in
@@ -149,7 +150,7 @@ public class TIFFEncodeParam implements 
             // Do nothing.
             break;
         default:
-            throw new Error("TIFFEncodeParam0");
+            throw new RuntimeException(PropertyUtil.getString("TIFFEncodeParam0"));
         }
 
         this.compression = compression;
@@ -250,7 +251,7 @@ public class TIFFEncodeParam implements 
         if (deflateLevel < 1
                 && deflateLevel > 9
                 && deflateLevel != Deflater.DEFAULT_COMPRESSION) {
-            throw new Error("TIFFEncodeParam1");
+            throw new RuntimeException(PropertyUtil.getString("TIFFEncodeParam1"));
         }
 
         this.deflateLevel = deflateLevel;

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java Mon Apr  9 23:37:59 2012
@@ -19,6 +19,8 @@
 
 package org.apache.xmlgraphics.image.codec.tiff;
 
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
+
 class TIFFFaxDecoder {
 
     private int bitPointer, bytePointer;
@@ -614,9 +616,9 @@ class TIFFFaxDecoder {
 
                     updatePointer(4 - bits);
                 } else if (bits == 0) {     // ERROR
-                    throw new Error("TIFFFaxDecoder0");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder0"));
                 } else if (bits == 15) {    // EOL
-                    throw new Error("TIFFFaxDecoder1");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder1"));
                 } else {
                     // 11 bits - 0000 0111 1111 1111 = 0x07ff
                     code = (entry >>> 5) & 0x07ff;
@@ -672,7 +674,7 @@ class TIFFFaxDecoder {
                         updatePointer(4 - bits);
                     } else if (bits == 15) {
                         // EOL code
-                        throw new Error("TIFFFaxDecoder2");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder2"));
                     } else {
                         setToBlack(buffer, lineOffset, bitOffset, code);
                         bitOffset += code;
@@ -753,7 +755,7 @@ class TIFFFaxDecoder {
 
         // The data must start with an EOL code
         if (readEOL() != 1) {
-            throw new Error("TIFFFaxDecoder3");
+            throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder3"));
         }
 
         int lineOffset = 0;
@@ -855,7 +857,7 @@ class TIFFFaxDecoder {
 
                         updatePointer(7 - bits);
                     } else {
-                        throw new Error("TIFFFaxDecoder4");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder4"));
                     }
                 }
 
@@ -1002,7 +1004,7 @@ class TIFFFaxDecoder {
                     updatePointer(7 - bits);
                 } else if (code == 11) {
                     if (nextLesserThan8Bits(3) != 7) {
-                        throw new Error("TIFFFaxDecoder5");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder5"));
                     }
 
                     int zeros = 0;
@@ -1068,7 +1070,7 @@ class TIFFFaxDecoder {
 
                     }
                 } else {
-                    throw new Error("TIFFFaxDecoder5");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder5"));
                 }
             }
 
@@ -1144,9 +1146,9 @@ class TIFFFaxDecoder {
                 runLength += code;
                 updatePointer(4 - bits);
             } else if (bits == 0) {     // ERROR
-                throw new Error("TIFFFaxDecoder0");
+                throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder0"));
             } else if (bits == 15) {    // EOL
-                throw new Error("TIFFFaxDecoder1");
+                throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder1"));
             } else {
                 // 11 bits - 0000 0111 1111 1111 = 0x07ff
                 code = (entry >>> 5) & 0x07ff;
@@ -1197,7 +1199,7 @@ class TIFFFaxDecoder {
                     updatePointer(4 - bits);
                 } else if (bits == 15) {
                     // EOL code
-                    throw new Error("TIFFFaxDecoder2");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder2"));
                 } else {
                     runLength += code;
                     updatePointer(9 - bits);
@@ -1228,7 +1230,7 @@ class TIFFFaxDecoder {
     private int readEOL() {
         if (fillBits == 0) {
             if (nextNBits(12) != 1) {
-                throw new Error("TIFFFaxDecoder6");
+                throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder6"));
             }
         } else if (fillBits == 1) {
 
@@ -1239,7 +1241,7 @@ class TIFFFaxDecoder {
             int bitsLeft = 8 - bitPointer;
 
             if (nextNBits(bitsLeft) != 0) {
-                    throw new Error("TIFFFaxDecoder8");
+                throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder8"));
             }
 
             // If the number of bitsLeft is less than 8, then to have a 12
@@ -1248,7 +1250,7 @@ class TIFFFaxDecoder {
             // that.
             if (bitsLeft < 4) {
                 if (nextNBits(8) != 0) {
-                    throw new Error("TIFFFaxDecoder8");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder8"));
                 }
             }
 
@@ -1260,7 +1262,7 @@ class TIFFFaxDecoder {
 
                 // If not all zeros
                 if (n != 0) {
-                    throw new Error("TIFFFaxDecoder8");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder8"));
                 }
             }
         }
@@ -1337,7 +1339,7 @@ class TIFFFaxDecoder {
                 next2next = flipTable[data[bp + 2] & 0xff];
             }
         } else {
-            throw new Error("TIFFFaxDecoder7");
+            throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder7"));
         }
 
         int bitsLeft = 8 - bitPointer;
@@ -1394,7 +1396,7 @@ class TIFFFaxDecoder {
                 next = flipTable[data[bp + 1] & 0xff];
             }
         } else {
-            throw new Error("TIFFFaxDecoder7");
+            throw new RuntimeException(PropertyUtil.getString("TIFFFaxDecoder7"));
         }
 
         int bitsLeft = 8 - bitPointer;

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java Mon Apr  9 23:37:59 2012
@@ -437,13 +437,13 @@ public class TIFFField implements Compar
      * <p><b>Note: this class has a natural ordering that is inconsistent
      * with <code>equals()</code>.</b>
      *
-     * @throws IllegalArgumentException if the parameter is <code>null</code>.
+     * @throws NullPointerException if the parameter is <code>null</code>.
      * @throws ClassCastException if the parameter is not a
      *         <code>TIFFField</code>.
      */
     public int compareTo(Object o) {
         if(o == null) {
-            throw new IllegalArgumentException();
+            throw new NullPointerException();
         }
 
         int oTag = ((TIFFField)o).getTag();

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java Mon Apr  9 23:37:59 2012
@@ -41,6 +41,7 @@ import java.util.Map;
 import java.util.zip.DataFormatException;
 import java.util.zip.Inflater;
 
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 import org.apache.xmlgraphics.image.codec.util.SeekableStream;
 import org.apache.xmlgraphics.image.rendered.AbstractRed;
 import org.apache.xmlgraphics.image.rendered.CachableRed;
@@ -122,7 +123,7 @@ public class TIFFImage extends AbstractR
         try {
             inflater.inflate(inflated);
         } catch (DataFormatException dfe) {
-            throw new RuntimeException("TIFFImage17" + ": " +
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage17") + ": " +
                                        dfe.getMessage());
         }
         inflater.reset();
@@ -154,7 +155,8 @@ public class TIFFImage extends AbstractR
         } else if (field.getType() == TIFFField.TIFF_LONG) {
             value = field.getAsLongs();
         } else {
-            throw new RuntimeException();
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage18") + ": "
+                                       + field.getType());
         }
 
         return value;
@@ -200,7 +202,7 @@ public class TIFFImage extends AbstractR
 
             // Support planar format (band sequential) only for 1 sample/pixel.
             if (planarConfiguration[0] != 1 && samplesPerPixel != 1) {
-                throw new RuntimeException("TIFFImage0");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage0"));
             }
 
             // Read the TIFF_BITS_PER_SAMPLE field
@@ -215,7 +217,7 @@ public class TIFFImage extends AbstractR
                 // Ensure that all samples have the same bit depth.
                 for (int i = 1; i < bitsPerSample.length; i++) {
                     if (bitsPerSample[i] != bitsPerSample[0]) {
-                        throw new RuntimeException("TIFFImage1");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage1"));
                     }
                 }
             }
@@ -233,7 +235,7 @@ public class TIFFImage extends AbstractR
                 // Check that all the samples have the same format
                 for (int l = 1; l < sampleFormat.length; l++) {
                     if (sampleFormat[l] != sampleFormat[0]) {
-                        throw new RuntimeException("TIFFImage2");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage2"));
                     }
                 }
 
@@ -271,7 +273,7 @@ public class TIFFImage extends AbstractR
             }
 
             if (!isValidDataFormat) {
-                throw new RuntimeException("TIFFImage3");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage3"));
             }
 
             // Figure out what compression if any, is being used.
@@ -338,7 +340,8 @@ public class TIFFImage extends AbstractR
 
             // Bail out if not one of the supported types.
             if (imageType == TYPE_UNSUPPORTED) {
-                throw new RuntimeException("TIFFImage4");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage4") + ": "
+                                           + imageType);
             }
 
             // Set basic image layout
@@ -403,7 +406,7 @@ public class TIFFImage extends AbstractR
                 TIFFField tileOffsetsField =
                     dir.getField(TIFFImageDecoder.TIFF_STRIP_OFFSETS);
                 if (tileOffsetsField == null) {
-                    throw new RuntimeException("TIFFImage5");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFImage5"));
                 } else {
                     tileOffsets = getFieldAsLongs(tileOffsetsField);
                 }
@@ -411,7 +414,7 @@ public class TIFFImage extends AbstractR
                 TIFFField tileByteCountsField =
                     dir.getField(TIFFImageDecoder.TIFF_STRIP_BYTE_COUNTS);
                 if (tileByteCountsField == null) {
-                    throw new RuntimeException("TIFFImage6");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFImage6"));
                 } else {
                     tileByteCounts = getFieldAsLongs(tileByteCountsField);
                 }
@@ -446,7 +449,7 @@ public class TIFFImage extends AbstractR
             case COMP_FAX_G3_2D:
             case COMP_FAX_G4_2D:
                 if (sampleSize != 1) {
-                    throw new RuntimeException("TIFFImage7");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFImage7"));
                 }
 
                 // Fax T.4 compression options
@@ -489,12 +492,11 @@ public class TIFFImage extends AbstractR
                     predictor = predictorField.getAsInt(0);
 
                     if (predictor != 1 && predictor != 2) {
-                        throw new RuntimeException("TIFFImage8");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage8"));
                     }
 
                     if (predictor == 2 && sampleSize != 8) {
-                        throw new RuntimeException(sampleSize +
-                                                   "TIFFImage9");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage9"));
                     }
                 }
 
@@ -503,11 +505,11 @@ public class TIFFImage extends AbstractR
                 break;
 
             case COMP_JPEG_OLD:
-                throw new RuntimeException("TIFFImage15");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage15"));
 
             default:
-                throw new RuntimeException("Compression not supported: " + compression);
-                //throw new RuntimeException("TIFFImage10");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage10") + ": "
+                                           + compression);
             }
 
             ColorModel  colorModel  = null;
@@ -604,7 +606,7 @@ public class TIFFImage extends AbstractR
                 // Get the colormap
                 TIFFField cfield = dir.getField(TIFFImageDecoder.TIFF_COLORMAP);
                 if (cfield == null) {
-                    throw new RuntimeException("TIFFImage11");
+                    throw new RuntimeException(PropertyUtil.getString("TIFFImage11"));
                 } else {
                     colormap = cfield.getAsChars();
                 }
@@ -701,7 +703,8 @@ public class TIFFImage extends AbstractR
                 break;
 
             default:
-                throw new RuntimeException("TIFFImage4");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage4") + ": "
+                                           + imageType);
             }
 
         Map properties = new HashMap();
@@ -736,7 +739,7 @@ public class TIFFImage extends AbstractR
     public synchronized Raster getTile(int tileX, int tileY) {
         if ((tileX < 0) || (tileX >= tilesX) ||
             (tileY < 0) || (tileY >= tilesY)) {
-            throw new IllegalArgumentException("TIFFImage12");
+            throw new IllegalArgumentException(PropertyUtil.getString("TIFFImage12"));
         }
 
         // System.out.println("Called TIFF getTile:" + tileX + "," + tileY);
@@ -774,7 +777,8 @@ public class TIFFImage extends AbstractR
             save_offset = stream.getFilePointer();
             stream.seek(tileOffsets[tileY * tilesX + tileX]);
         } catch (IOException ioe) {
-            throw new RuntimeException("TIFFImage13");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
         }
 
         // Number of bytes in this tile (strip) after compression.
@@ -835,7 +839,8 @@ public class TIFFImage extends AbstractR
 
                 stream.seek(save_offset);
             } catch (IOException ioe) {
-                throw new RuntimeException("TIFFImage13");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
             }
         } else if (imageType == TYPE_PALETTE) { // palette-RGB
             if (sampleSize == 16) {
@@ -902,7 +907,8 @@ public class TIFFImage extends AbstractR
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException("TIFFImage13");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
                     }
 
                     if (dataType == DataBuffer.TYPE_USHORT) {
@@ -1001,7 +1007,8 @@ public class TIFFImage extends AbstractR
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException("TIFFImage13");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
                     }
                 }
 
@@ -1043,14 +1050,15 @@ public class TIFFImage extends AbstractR
                             tempData = new byte[byteCount];
                             stream.readFully(tempData, 0, byteCount);
                         } else {
-                            throw new RuntimeException(
-                                    "Compression type not supported: " + compression);
+                            throw new RuntimeException(PropertyUtil.getString("IFFImage10") + ": "
+                                                       + compression);
                         }
 
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException("TIFFImage13");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
                     }
 
                     // Expand the palette image into an rgb image with ushort
@@ -1098,14 +1106,15 @@ public class TIFFImage extends AbstractR
                             stream.readFully(bdata, 0, byteCount);
 
                         } else {
-                            throw new RuntimeException(
-                                    "Compression type not supported: " + compression);
+                            throw new RuntimeException(PropertyUtil.getString("TIFFImage10")
+                                                       + ": " + compression);
                         }
 
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException("TIFFImage13");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
                     }
                 }
 
@@ -1123,7 +1132,8 @@ public class TIFFImage extends AbstractR
                         stream.readFully(data, 0, byteCount);
                         stream.seek(save_offset);
                     } catch (IOException ioe) {
-                        throw new RuntimeException("TIFFImage13");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
                     }
 
                     // If compressed, decode the data.
@@ -1209,7 +1219,8 @@ public class TIFFImage extends AbstractR
                         stream.seek(save_offset);
 
                     } catch (IOException ioe) {
-                        throw new RuntimeException("TIFFImage13");
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
                     }
                 }
             }
@@ -1248,7 +1259,8 @@ public class TIFFImage extends AbstractR
 
                 stream.seek(save_offset);
             } catch (IOException ioe) {
-                throw new RuntimeException("TIFFImage13");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
             }
         } else { // everything else
             try {
@@ -1274,8 +1286,8 @@ public class TIFFImage extends AbstractR
                         inflate(data, bdata);
 
                     } else {
-                        throw new RuntimeException(
-                                "Compression type not supported: " + compression);
+                        throw new RuntimeException(PropertyUtil.getString("TIFFImage10")
+                                                   + ": " + compression);
                     }
 
                 } else if (sampleSize == 16) {
@@ -1371,7 +1383,8 @@ public class TIFFImage extends AbstractR
                 stream.seek(save_offset);
 
             } catch (IOException ioe) {
-                throw new RuntimeException("TIFFImage13");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
             }
 
             // Modify the data for certain special cases.
@@ -1531,7 +1544,8 @@ public class TIFFImage extends AbstractR
         try {
             stream.readFully(byteArray, 0, byteCount);
         } catch (IOException ioe) {
-            throw new RuntimeException("TIFFImage13");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
         }
 
         interpretBytesAsShorts(byteArray, shortArray, shortCount);
@@ -1547,7 +1561,8 @@ public class TIFFImage extends AbstractR
         try {
             stream.readFully(byteArray, 0, byteCount);
         } catch (IOException ioe) {
-            throw new RuntimeException("TIFFImage13");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage13") + ": " +
+                                       ioe.getMessage());
         }
 
         interpretBytesAsInts(byteArray, intArray, intCount);
@@ -1645,7 +1660,8 @@ public class TIFFImage extends AbstractR
                 }
             }
         } catch (java.lang.ArrayIndexOutOfBoundsException ae) {
-            throw new RuntimeException("TIFFImage14");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImage14") + ": " +
+                                       ae.getMessage());
         }
 
         return dst;
@@ -1668,7 +1684,8 @@ public class TIFFImage extends AbstractR
                 cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
                 break;
             default:
-                throw new IllegalArgumentException();
+                throw new IllegalArgumentException(PropertyUtil.getString("TIFFImage19") + ": " +
+                                                   numBands);
         }
 
         int componentSize = 0;
@@ -1684,7 +1701,8 @@ public class TIFFImage extends AbstractR
                 componentSize = 32;
                 break;
             default:
-                throw new IllegalArgumentException();
+                throw new IllegalArgumentException(PropertyUtil.getString("TIFFImage20") + ": " +
+                                                   dataType);
         }
 
         RGBBits = new int[numBands];

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java Mon Apr  9 23:37:59 2012
@@ -24,6 +24,7 @@ import java.io.IOException;
 
 import org.apache.xmlgraphics.image.codec.util.ImageDecodeParam;
 import org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 import org.apache.xmlgraphics.image.codec.util.SeekableStream;
 
 /**
@@ -84,7 +85,7 @@ public class TIFFImageDecoder extends Im
 
     public RenderedImage decodeAsRenderedImage(int page) throws IOException {
         if  ((page < 0) || (page >= getNumPages())) {
-            throw new IOException("TIFFImageDecoder0");
+            throw new IOException(PropertyUtil.getString("TIFFImageDecoder0"));
         }
         return new TIFFImage(input, (TIFFDecodeParam)param, page);
     }

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java Mon Apr  9 23:37:59 2012
@@ -45,6 +45,7 @@ import java.util.zip.Deflater;
 
 import org.apache.xmlgraphics.image.codec.util.ImageEncodeParam;
 import org.apache.xmlgraphics.image.codec.util.ImageEncoderImpl;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 import org.apache.xmlgraphics.image.codec.util.SeekableOutputStream;
 
 /**
@@ -146,8 +147,7 @@ public class TIFFImageEncoder extends Im
         // Get the encoding parameters.
         TIFFEncodeParam encodeParam = (TIFFEncodeParam)param;
         if (encodeParam.getExtraImages() != null) {
-            throw new IllegalStateException(
-                    "Extra images may not be used when calling encodeMultiple!");
+            throw new IllegalStateException(PropertyUtil.getString("TIFFImageEncoder11"));
         }
 
         Context c = (Context)context;
@@ -171,7 +171,7 @@ public class TIFFImageEncoder extends Im
      */
     public void finishMultiple(Object context) throws IOException {
         if (context == null) {
-            throw new NullPointerException("context must not be null");
+            throw new NullPointerException();
         }
         Context c = (Context)context;
         // Get the encoding parameters.
@@ -194,7 +194,7 @@ public class TIFFImageEncoder extends Im
         int compression = encodeParam.getCompression();
 
         if (compression == COMP_JPEG_TTN2) {
-            throw new IllegalArgumentException("JPEG compression is not supported");
+            throw new IllegalArgumentException(PropertyUtil.getString("TIFFImageEncoder12"));
         }
 
         // Get tiled output preference.
@@ -213,14 +213,14 @@ public class TIFFImageEncoder extends Im
         int[] sampleSize = sampleModel.getSampleSize();
         for (int i = 1; i < sampleSize.length; i++) {
             if (sampleSize[i] != sampleSize[0]) {
-                throw new Error("TIFFImageEncoder0");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder0"));
             }
         }
 
         // Check low bit limits.
         int numBands = sampleModel.getNumBands();
         if ((sampleSize[0] == 1 || sampleSize[0] == 4) && numBands != 1) {
-            throw new Error("TIFFImageEncoder1");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder1"));
         }
 
         // Retrieve and verify data type.
@@ -229,23 +229,23 @@ public class TIFFImageEncoder extends Im
         case DataBuffer.TYPE_BYTE:
             if (sampleSize[0] != 1 && sampleSize[0] == 4 &&    // todo does this make sense??
                sampleSize[0] != 8) {                          // we get error only for 4
-                throw new Error("TIFFImageEncoder2");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder2"));
             }
             break;
         case DataBuffer.TYPE_SHORT:
         case DataBuffer.TYPE_USHORT:
             if (sampleSize[0] != 16) {
-                throw new Error("TIFFImageEncoder3");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder3"));
             }
             break;
         case DataBuffer.TYPE_INT:
         case DataBuffer.TYPE_FLOAT:
             if (sampleSize[0] != 32) {
-                throw new Error("TIFFImageEncoder4");
+                throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder4"));
             }
             break;
         default:
-            throw new Error("TIFFImageEncoder5");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder5"));
         }
 
         boolean dataTypeIsShort =
@@ -257,7 +257,7 @@ public class TIFFImageEncoder extends Im
             colorModel instanceof IndexColorModel &&
             dataType != DataBuffer.TYPE_BYTE) {
             // Don't support (unsigned) short palette-color images.
-            throw new Error("TIFFImageEncoder6");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder6"));
         }
         IndexColorModel icm = null;
         int sizeOfColormap = 0;
@@ -274,8 +274,7 @@ public class TIFFImageEncoder extends Im
             if (sampleSize[0] == 1 && numBands == 1) { // Bilevel image
 
                 if (mapSize != 2) {
-                    throw new IllegalArgumentException(
-                                        "TIFFImageEncoder7");
+                    throw new IllegalArgumentException(PropertyUtil.getString("TIFFImageEncoder7"));
                 }
 
                 byte[] r = new byte[mapSize];
@@ -365,7 +364,7 @@ public class TIFFImageEncoder extends Im
         }
 
         if (imageType == TIFF_UNSUPPORTED) {
-            throw new Error("TIFFImageEncoder8");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder8"));
         }
 
         int photometricInterpretation = -1;
@@ -431,7 +430,7 @@ public class TIFFImageEncoder extends Im
             break;
 
         default:
-            throw new Error("TIFFImageEncoder8");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder8"));
         }
 
         // Initialize tile dimensions.
@@ -1196,7 +1195,7 @@ public class TIFFImageEncoder extends Im
                 }
             } else {
                 // This should never happen.
-                throw new IllegalStateException();
+                throw new IllegalStateException(PropertyUtil.getString("TIFFImageEncoder13"));
             }
         }
 
@@ -1466,7 +1465,7 @@ public class TIFFImageEncoder extends Im
             break;
 
         default:
-            throw new Error("TIFFImageEncoder10");
+            throw new RuntimeException(PropertyUtil.getString("TIFFImageEncoder10"));
 
         }
 
@@ -1502,7 +1501,7 @@ public class TIFFImageEncoder extends Im
             return ((SeekableOutputStream)out).getFilePointer();
         } else {
             // Shouldn't happen.
-            throw new IllegalStateException();
+            throw new IllegalStateException(PropertyUtil.getString("TIFFImageEncoder13"));
         }
     }
 

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java Mon Apr  9 23:37:59 2012
@@ -19,10 +19,10 @@
 
 package org.apache.xmlgraphics.image.codec.tiff;
 
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
+
 /**
  * A class for performing LZW decoding.
- *
- *
  */
 public class TIFFLZWDecoder {
 
@@ -60,7 +60,7 @@ public class TIFFLZWDecoder {
     public byte[] decode(byte[] data, byte[] uncompData, int h) {
 
         if(data[0] == (byte)0x00 && data[1] == (byte)0x01) {
-            throw new UnsupportedOperationException("TIFFLZWDecoder0");
+            throw new UnsupportedOperationException(PropertyUtil.getString("TIFFLZWDecoder0"));
         }
 
         initializeStringTable();

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java Mon Apr  9 23:37:59 2012
@@ -347,7 +347,8 @@ public class ImageLoaderImageIO extends 
 
         // Arbitrarily select a BufferedImage type.
         int imageType;
-        switch(raster.getNumBands()) {
+        int numBands = raster.getNumBands();
+        switch(numBands) {
         case 1:
             imageType = BufferedImage.TYPE_BYTE_GRAY;
             break;
@@ -358,7 +359,7 @@ public class ImageLoaderImageIO extends 
             imageType = BufferedImage.TYPE_4BYTE_ABGR;
             break;
         default:
-            throw new UnsupportedOperationException();
+            throw new UnsupportedOperationException("Unsupported band count: " + numBands);
         }
 
         // Create a BufferedImage.

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/RenderedImageCachableRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/RenderedImageCachableRed.java?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/RenderedImageCachableRed.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/RenderedImageCachableRed.java Mon Apr  9 23:37:59 2012
@@ -53,7 +53,7 @@ public class RenderedImageCachableRed im
 
     public RenderedImageCachableRed(RenderedImage src) {
         if(src == null){
-            throw new IllegalArgumentException();
+            throw new NullPointerException();
         }
         this.src = src;
     }

Modified: xmlgraphics/commons/trunk/src/resources/org/apache/xmlgraphics/image/codec/Messages.properties
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/resources/org/apache/xmlgraphics/image/codec/Messages.properties?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/resources/org/apache/xmlgraphics/image/codec/Messages.properties (original)
+++ xmlgraphics/commons/trunk/src/resources/org/apache/xmlgraphics/image/codec/Messages.properties Mon Apr  9 23:37:59 2012
@@ -32,6 +32,10 @@ PNGEncodeParam21=Modification time has n
 PNGEncodeParam22=Compressed text strings have not been set.
 PNGEncodeParam23='unsetBackground' not implemented by the superclass 'PNGEncodeParam'.
 PNGEncodeParam24='isBackgroundSet' not implemented by the superclass 'PNGEncodeParam'.
+PNGEncodeParam25=Bit shift must be greater than 0.
+PNGEncodeParam26=Bit depth must be 8 or 16.
+PNGEncodeParam27=RGB value must have three components.
+PNGEncodeParam28=Chromaticity array must be non-empty.
 PNGEncodeParam2=Bit depth not equal to 1, 2, 4, or 8.
 PNGEncodeParam3=RGB palette has not been set.
 PNGEncodeParam4=background palette index has not been set.
@@ -60,12 +64,11 @@ PNGImageDecoder6=A palette-color PNG ima
 PNGImageDecoder7=A PNG Gray+Alpha image can't have a bit depth less than 8.
 PNGImageDecoder8=A PNG RGB+Alpha image can't have a bit depth less than 8.
 PNGImageDecoder9=Unsupported PNG compression method (not 0).
-PNMImageDecoder0=Unrecognized magic value for PBM/PGM/PPM file.
-PNMImageDecoder1=IOException occured while processing PNM.
-PNMImageDecoder5=Illegal page requested from a PNM file.
-PNMImageEncoder0=Source image has float/double data type, unsuitable for PNM file format.
-PNMImageEncoder1=Image has an IndexColorModel whose map size is to small for the data type obtained from SampleModel.
-PNMImageEncoder1=Source image has unsuitable number of bands for PNM file format.
+PNGImageEncoder0=Sample size not equal to bit depth.
+PNGImageEncoder1=Bit depth greater than 16.
+PNGImageEncoder2=Bit depth less than 1 or greater than 8.
+PNGImageEncoder3=Number of bands not equal to 1.
+PNGImageEncoder4=PNG encode parameter must be Palette or Gray.
 PropertySet0=Not implemented.
 RasterFactory0=Number of bands must be greater than 0.
 RasterFactory10=parentY lies outside raster.
@@ -86,3 +89,54 @@ RasterFactory8=This method does not supp
 RasterFactory9=parentX lies outside raster.
 SegmentedSeekableStream0=Source stream does not support seeking backwards.
 SingleTileRenderedImage0=Illegal tile requested from a SingleTileRenderedImage.
+TIFFImage0=Planar (band-sequential) format TIFF is not supported.
+TIFFImage1=All samples must have the same bit depth.
+TIFFImage2=All samples must have the same data format.
+TIFFImage3=Unsupported combination of bit depth and sample format.
+TIFFImage4=Unsupported image type.
+TIFFImage5=Strip offsets, a required field, is not present in the TIFF file.
+TIFFImage5=Strip byte counts, a required field, is not present in the TIFF file.
+TIFFImage7=Unsupported compression type for non-bilevel data.
+TIFFImage8=Illegal value for predictor in TIFF file.
+TIFFImage9=Sample size must be 8 for horizontal differencing predictor.
+TIFFImage10=Unsupported compression type
+TIFFImage11=Colormap must be present for a Palette Color image.
+TIFFImage12=Illegal tile requested from a TIFFImage.
+TIFFImage13=IOException occured while reading TIFF image data
+TIFFImage14=Unable to decode packbits compressed data - not enough data
+TIFFImage15=Decoding of old style JPEG-in-TIFF data is not supported.
+TIFFImage17=Error inflating data
+TIFFImage18=Unsupported field type
+TIFFImage19=Unsupported number of bands
+TIFFImage20=Unsupported data type
+TIFFImageDecoder0=Illegal page requested from a TIFF file.
+TIFFImageEncoder0=All samples must have the same bit depth.
+TIFFImageEncoder1=1- and 4-bit data supported for single band images only.
+TIFFImageEncoder2=Byte buffers require 1-, 4-, or b-bit data.
+TIFFImageEncoder3=Short or unsigned short buffers require 16-bit data.
+TIFFImageEncoder4=Int or float buffers require 32-bit data.
+TIFFImageEncoder5=Unsupported output data type.
+TIFFImageEncoder6=TIFF encoder does not support (unsigned) short palette images.
+TIFFImageEncoder7=Invalid image - An image with sampleSize of 1 bit must have IndexColorModel with mapsize of 2.
+TIFFImageEncoder8=Image type not supported for output.
+TIFFImageEncoder9=JPEG-in-TIFF encoding supported only for 8-bit samples and either 1 (grayscale) or 3 (RGB or YCbCr) samples per pixel.
+TIFFImageEncoder10=Unsupported TIFFField type.
+TIFFImageEncoder11=Extra images may not be used when encoding multiple page file.
+TIFFImageEncoder12=JPEG compression not supported.
+TIFFImageEncoder13=No output specified.
+TIFFLZWDecoder0=TIFF 5.0 LZW codes are not supported.
+TIFFFaxDecoder0=ERROR code word (0) encountered.
+TIFFFaxDecoder1=EOL code word (15) encountered in White run.
+TIFFFaxDecoder2=EOL code word (15) encountered in Black run.
+TIFFFaxDecoder3=First scanline must be 1D encoded.
+TIFFFaxDecoder4=Invalid code encountered while decoding 2D group 3 compressed data.
+TIFFFaxDecoder5=Invalid code encountered while decoding 2D group 4 compressed data.
+TIFFFaxDecoder6=Scanline must begin with EOL code word.
+TIFFFaxDecoder7=TIFF_FILL_ORDER tag must be either 1 or 2.
+TIFFFaxDecoder8=All fill bits preceding EOL code must be 0.
+TIFFDirectory0=Unsupported TIFFField tag.
+TIFFDirectory1=Bad endianness tag (not 0x4949 or 0x4d4d).
+TIFFDirectory2=Bad magic number, should be 42.
+TIFFDirectory3=Directory number too large.
+TIFFEncodeParam0=Unsupported compression scheme specified.
+TIFFEncodeParam1=Illegal DEFLATE compression level specified.
\ No newline at end of file

Modified: xmlgraphics/commons/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/status.xml?rev=1311522&r1=1311521&r2=1311522&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/status.xml (original)
+++ xmlgraphics/commons/trunk/status.xml Mon Apr  9 23:37:59 2012
@@ -41,6 +41,9 @@
   </contexts>
   <changes>
     <release version="Trunk" date="n/a">
+      <action context="Code" dev="GA" type="fix" fixes-bug="47175" due-to="Sebastian Bazley">
+        Ensure that throwables have meaningful messages.
+      </action>
       <action context="Code" dev="GA" type="update">
         Minor build improvements to eliminate warning and parameterize junit formatting.
         Eliminate (5) deprecation warnings.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message