Revision: 9702
Author: [email protected]
Date: Tue Feb  8 16:59:56 2011
Log: Include the property name in the error message when a single-valued property does not have exactly one value

Review at http://gwt-code-reviews.appspot.com/1348801

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=9702

Modified:
/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardConfigurationProperty.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardConfigurationProperty.java Mon Dec 20 11:48:24 2010 +++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardConfigurationProperty.java Tue Feb 8 16:59:56 2011
@@ -37,8 +37,8 @@
       throw new IllegalArgumentException("values is null");
     }
     if (!p.allowsMultipleValues() && values.size() != 1) {
-      throw new IllegalArgumentException(
-          "p is single-valued but values.size != 1");
+      throw new IllegalArgumentException(p.getName()
+          + " property requires exactly one value but values = " + values);
     }
   }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to