Skip to content

Commit d556d8f

Browse files
committed
Display class type instead of type
1 parent e31cb4d commit d556d8f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/java/qupath/ext/imglib2/ImgBuilder.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ private static <T> void checkType(ImageServer<?> server, T type) {
368368
if (!(type instanceof ARGBType)) {
369369
throw new IllegalArgumentException(String.format(
370370
"The provided type %s is not an ARGBType, which is the one expected for RGB images",
371-
type
371+
type.getClass()
372372
));
373373
}
374374
} else {
@@ -377,63 +377,63 @@ private static <T> void checkType(ImageServer<?> server, T type) {
377377
if (!(type instanceof UnsignedByteType)) {
378378
throw new IllegalArgumentException(String.format(
379379
"The provided type %s is not a ByteType, which is the one expected for non-RGB UINT8 images",
380-
type
380+
type.getClass()
381381
));
382382
}
383383
}
384384
case INT8 -> {
385385
if (!(type instanceof ByteType)) {
386386
throw new IllegalArgumentException(String.format(
387387
"The provided type %s is not a UnsignedByteType, which is the one expected for non-RGB INT8 images",
388-
type
388+
type.getClass()
389389
));
390390
}
391391
}
392392
case UINT16 -> {
393393
if (!(type instanceof UnsignedShortType)) {
394394
throw new IllegalArgumentException(String.format(
395395
"The provided type %s is not a UnsignedShortType, which is the one expected for non-RGB UINT16 images",
396-
type
396+
type.getClass()
397397
));
398398
}
399399
}
400400
case INT16 -> {
401401
if (!(type instanceof ShortType)) {
402402
throw new IllegalArgumentException(String.format(
403403
"The provided type %s is not a ShortType, which is the one expected for non-RGB INT16 images",
404-
type
404+
type.getClass()
405405
));
406406
}
407407
}
408408
case UINT32 -> {
409409
if (!(type instanceof UnsignedIntType)) {
410410
throw new IllegalArgumentException(String.format(
411411
"The provided type %s is not a UnsignedIntType, which is the one expected for non-RGB UINT32 images",
412-
type
412+
type.getClass()
413413
));
414414
}
415415
}
416416
case INT32 -> {
417417
if (!(type instanceof IntType)) {
418418
throw new IllegalArgumentException(String.format(
419419
"The provided type %s is not a IntType, which is the one expected for non-RGB INT32 images",
420-
type
420+
type.getClass()
421421
));
422422
}
423423
}
424424
case FLOAT32 -> {
425425
if (!(type instanceof FloatType)) {
426426
throw new IllegalArgumentException(String.format(
427427
"The provided type %s is not a FloatType, which is the one expected for non-RGB FLOAT32 images",
428-
type
428+
type.getClass()
429429
));
430430
}
431431
}
432432
case FLOAT64 -> {
433433
if (!(type instanceof DoubleType)) {
434434
throw new IllegalArgumentException(String.format(
435435
"The provided type %s is not a DoubleType, which is the one expected for non-RGB FLOAT64 images",
436-
type
436+
type.getClass()
437437
));
438438
}
439439
}

0 commit comments

Comments
 (0)