OSDN Git Service

2004-04-20 Ingo Proetel <proetel@aicas.com>
[pf3gnuchains/gcc-fork.git] / libjava / java / awt / image / SampleModel.java
index 219a871..a5d65ff 100644 (file)
@@ -58,7 +58,9 @@ public abstract class SampleModel
 
   public SampleModel(int dataType, int w, int h, int numBands)
   {
-    if ((w<=0) || (h<=0)) throw new IllegalArgumentException();
+    if ((w <= 0) || (h <= 0)) 
+      throw new IllegalArgumentException((w <= 0 ? " width<=0" : " width is ok")
+                                         +(h <= 0 ? " height<=0" : " height is ok"));
        
     // FIXME: How can an int be greater than Integer.MAX_VALUE?
     // FIXME: How do we identify an unsupported data type?
@@ -68,7 +70,7 @@ public abstract class SampleModel
     this.height = h;
     this.numBands = numBands;  
   }
-
+  
   public final int getWidth()
   {
     return width;