provide more useful message when throwing exception from Field.set

This commit is contained in:
Joel Dice 2010-03-07 12:03:17 -07:00
parent 3e5b2cbc7b
commit a650f1affa

View File

@ -191,7 +191,8 @@ public class Field<T> extends AccessibleObject {
setObject(target, offset, value); setObject(target, offset, value);
} else { } else {
throw new IllegalArgumentException throw new IllegalArgumentException
("need " + getType() + ", got " + value.getClass().getName()); ("needed " + getType() + ", got " + value.getClass().getName() +
" when setting " + class_.getName() + "." + getName());
} }
break; break;