Author: kmenard
Date: Tue May 30 13:26:11 2006
New Revision: 410365
URL: http://svn.apache.org/viewvc?rev=410365&view=rev
Log:
Nicer error message.
Modified:
incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/Entity.java
Modified:
incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/Entity.java
URL:
http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/Entity.java?rev=410365&r1=410364&r2=410365&view=diff
==============================================================================
---
incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/Entity.java
(original)
+++
incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/Entity.java
Tue May 30 13:26:11 2006
@@ -175,7 +175,7 @@
Object existingRelationship = relationships.get(attribute.getName());
if (existingRelationship != null) {
throw new IllegalArgumentException(
- "An attempt to override relationship '" +
attribute.getName());
+ "Attribute name conflict with existing relationship '" +
attribute.getName());
}
attributes.put(attribute.getName(), attribute);
@@ -223,7 +223,7 @@
// Check that there aren't any attributes with the same name as the
given relationship.
Object existingAttribute = attributes.get(relationship.getName());
if (existingAttribute != null) {
- throw new IllegalArgumentException("An attempt to override
attribute '"
+ throw new IllegalArgumentException("Relationship name conflict
with existing attribute '"
+ relationship.getName());
}