]> source.dussan.org Git - vaadin-framework.git/commitdiff
Improved error message
authorLeif Åstrand <leif@vaadin.com>
Fri, 11 May 2012 08:31:58 +0000 (11:31 +0300)
committerLeif Åstrand <leif@vaadin.com>
Fri, 11 May 2012 08:31:58 +0000 (11:31 +0300)
src/com/vaadin/data/util/IndexedContainer.java

index 1e0a2fae1a07d550c777584099e9d36f391b87a9..bcaa5eda4245a2eb4ca00cc7db0e7555d72a6fe3 100644 (file)
@@ -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<Object, Object> 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