mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
provide more useful message when throwing exception from Field.set
This commit is contained in:
parent
3e5b2cbc7b
commit
a650f1affa
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user