Make the exception message in JvmClassName helpful
This commit is contained in:
@@ -38,8 +38,7 @@ public class JvmClassName {
|
|||||||
@NotNull
|
@NotNull
|
||||||
public static JvmClassName byType(@NotNull Type type) {
|
public static JvmClassName byType(@NotNull Type type) {
|
||||||
if (type.getSort() != Type.OBJECT) {
|
if (type.getSort() != Type.OBJECT) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException("Type is not convertible to " + JvmClassName.class.getSimpleName() + ": " + type);
|
||||||
"must be an object to be converted to " + JvmClassName.class.getSimpleName());
|
|
||||||
}
|
}
|
||||||
return byInternalName(type.getInternalName());
|
return byInternalName(type.getInternalName());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user