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?
this.height = h;
this.numBands = numBands;
}
-
+
public final int getWidth()
{
return width;