From bb5fca1bcaaa114175c45bf0e4d78a53ccee6c8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Fri, 11 May 2012 11:31:58 +0300 Subject: [PATCH] Improved error message --- src/com/vaadin/data/util/IndexedContainer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5