From: Leif Åstrand Date: Fri, 11 May 2012 08:31:58 +0000 (+0300) Subject: Improved error message X-Git-Tag: 7.0.0.alpha3~256 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb5fca1bcaaa114175c45bf0e4d78a53ccee6c8a;p=vaadin-framework.git Improved error message --- diff --git a/src/com/vaadin/data/util/IndexedContainer.java b/src/com/vaadin/data/util/IndexedContainer.java index 1e0a2fae1a..bcaa5eda42 100644 --- a/src/com/vaadin/data/util/IndexedContainer.java +++ b/src/com/vaadin/data/util/IndexedContainer.java @@ -865,7 +865,6 @@ public class IndexedContainer extends * @see com.vaadin.data.Property#setValue(java.lang.Object) */ public void setValue(Object newValue) throws Property.ReadOnlyException { - // Gets the Property set final Map propertySet = items.get(itemId); @@ -875,8 +874,10 @@ public class IndexedContainer extends } else if (getType().isAssignableFrom(newValue.getClass())) { propertySet.put(propertyId, newValue); } else { - throw new IllegalArgumentException("Value is of invalid type, " - + getType().getName() + " expected"); + throw new IllegalArgumentException( + "Value is of invalid type, got " + + newValue.getClass().getName() + " but " + + getType().getName() + " was expected"); } // update the container filtering if this property is being filtered