Small fixes to warn and error messages.

Patch by hermes@google.com
Review by rjrjr@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@6182 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java b/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
index f26d9ca..55565b9 100644
--- a/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
+++ b/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
@@ -106,7 +106,7 @@
     String resourceName = elem.consumeRequiredAttribute("field");
     JClassType resourceType = consumeTypeAttribute(elem);
     if (elem.getAttributeCount() > 0) {
-      writer.die("In %s, should only find attributes \"field\" and \"type\"");
+      writer.die("In %s, should only find attributes \"field\" and \"type\"", elem);
     }
 
     FieldWriter fieldWriter = fieldManager.registerField(resourceType,
@@ -117,7 +117,7 @@
 
     if (ownerField != null) {
       if (!resourceType.equals(ownerField.getType().getRawType())) {
-        writer.die("In %s, type must match %s", ownerField);
+        writer.die("In %s, type must match %s", elem, ownerField);
       }
 
       if (ownerField.isProvided()) {
diff --git a/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java b/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
index edec5f7..743ee19 100644
--- a/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
+++ b/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
@@ -686,7 +686,7 @@
     final String templateResourceName = attribute.getName().split(":")[0];
     warn("The %1$s mechanism is deprecated. Instead, declare the following "
         + "%2$s:with element as a child of your %2$s:UiBinder element: "
-        + "<%2$s:with name='%3$s' type='%4$s.%5$s' />", BUNDLE_URI_SCHEME,
+        + "<%2$s:with field='%3$s' type='%4$s.%5$s' />", BUNDLE_URI_SCHEME,
         gwtPrefix, templateResourceName, bundleClass.getPackage().getName(),
         bundleClass.getName());