Author: jonesde
Date: Sat Aug 12 03:44:52 2006
New Revision: 431010
URL:
http://svn.apache.org/viewvc?rev=431010&view=revLog:
Small error message improvement when related entity is not found
Modified:
incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java
Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java
URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java?rev=431010&r1=431009&r2=431010&view=diff==============================================================================
--- incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java (original)
+++ incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java Sat Aug 12 03:44:52 2006
@@ -305,7 +305,12 @@
while (relationsIter.hasNext()) {
ModelRelation modelRelation = (ModelRelation) relationsIter.next();
if (("one".equals(modelRelation.getType()) || "one-nofk".equals(modelRelation.getType())) && !modelRelation.isAutoRelation()) {
- ModelEntity relatedEnt = this.getModelEntity(modelRelation.getRelEntityName());
+ ModelEntity relatedEnt = null;
+ try {
+ relatedEnt = this.getModelEntity(modelRelation.getRelEntityName());
+ } catch (GenericModelException e) {
+ throw new GenericModelException("Error getting related entity [" + modelRelation.getRelEntityName() + "] definition from entity [" + curEntityName + "]", e);
+ }
if (relatedEnt != null) {
// don't do relationship to the same entity, unless title is "Parent", then do a "Child" automatically
String targetTitle = modelRelation.getTitle();