]> source.dussan.org Git - vaadin-framework.git/commitdiff
Print type info when an illegal type is passed to setValue
authorArtur Signell <artur@vaadin.com>
Thu, 22 Dec 2011 12:13:11 +0000 (14:13 +0200)
committerArtur Signell <artur@vaadin.com>
Thu, 22 Dec 2011 12:13:11 +0000 (14:13 +0200)
src/com/vaadin/data/util/ObjectProperty.java

index 40e25dca893c7bef85fe73148c919bf57c0485e9..9c60b9146e28b9f79912164144ae8da56e767c9a 100644 (file)
@@ -125,8 +125,9 @@ public class ObjectProperty<T> extends AbstractProperty<T> {
 
         // Checks the type of the value
         if (newValue != null && !type.isAssignableFrom(newValue.getClass())) {
-            throw new IllegalArgumentException(
-                    "Invalid value type for ObjectProperty.");
+            throw new IllegalArgumentException("Invalid value type "
+                    + newValue.getClass().getName()
+                    + " for ObjectProperty of type " + type.getName() + ".");
         }
 
         // the cast is safe after an isAssignableFrom check