jlaskowski 2005/07/08 19:14:14
Modified: modules/core/src/java/org/openejb/entity/cmp
CMPInstanceContext.java
Log:
Provide more information on the cause of exceptions
Revision Changes Path
1.16 +4 -3
openejb/modules/core/src/java/org/openejb/entity/cmp/CMPInstanceContext.java
Index: CMPInstanceContext.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/entity/cmp/CMPInstanceContext.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- CMPInstanceContext.java 25 Feb 2005 23:06:10 -0000 1.15
+++ CMPInstanceContext.java 8 Jul 2005 23:14:14 -0000 1.16
@@ -149,12 +149,13 @@
// if we still don't have a row, we can only assume that they
have an old ref to the ejb
if(cacheRow == null) {
- throw new NoSuchEntityException("Entity not found");
+ // how to get the name of the bean
+ throw new NoSuchEntityException("Entity " + this + " not
found");
}
// check that the row is not tagged as removed
if(cacheRow.getState() == CacheRowState.REMOVED) {
- throw new NoSuchEntityException("Entity has been removed");
+ throw new NoSuchEntityException("Entity " + this + " has
been removed");
}
// copy data from tranql into instance