Be a little bit more helpful when the ObjectHolder misses. Should help figure out what is going in in #2006

This commit is contained in:
cpw 2015-07-09 17:05:20 -04:00
parent 8636eb1883
commit 0f456b4684

View file

@ -61,7 +61,7 @@ class ObjectHolderRef {
if (this.injectedObject == null || !isValid()) if (this.injectedObject == null || !isValid())
{ {
throw new IllegalStateException("The ObjectHolder annotation cannot apply to a field that is not an Item or Block"); throw new IllegalStateException(String.format("The ObjectHolder annotation cannot apply to a field that is not an Item or Block (found : %s at %s.%s)", field.getType().getName(), field.getClass().getName(), field.getName()));
} }
makeWritable(field); makeWritable(field);
} }