From: Artur Signell Date: Thu, 22 Dec 2011 12:13:11 +0000 (+0200) Subject: Print type info when an illegal type is passed to setValue X-Git-Tag: 7.0.0.alpha1~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2d157db090cf7bfef0519dc372bab94d5852cc80;p=vaadin-framework.git Print type info when an illegal type is passed to setValue --- diff --git a/src/com/vaadin/data/util/ObjectProperty.java b/src/com/vaadin/data/util/ObjectProperty.java index 40e25dca89..9c60b9146e 100644 --- a/src/com/vaadin/data/util/ObjectProperty.java +++ b/src/com/vaadin/data/util/ObjectProperty.java @@ -125,8 +125,9 @@ public class ObjectProperty extends AbstractProperty { // 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