Make the exception message in JvmClassName helpful

This commit is contained in:
Alexander Udalov
2013-02-01 16:26:04 +04:00
parent 7716feee71
commit 2a4f06e32d
@@ -38,8 +38,7 @@ public class JvmClassName {
@NotNull
public static JvmClassName byType(@NotNull Type type) {
if (type.getSort() != Type.OBJECT) {
throw new IllegalArgumentException(
"must be an object to be converted to " + JvmClassName.class.getSimpleName());
throw new IllegalArgumentException("Type is not convertible to " + JvmClassName.class.getSimpleName() + ": " + type);
}
return byInternalName(type.getInternalName());
}