db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattba...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/core PersistenceBrokerImpl.java
Date Tue, 01 Jul 2003 00:37:43 GMT
mattbaird    2003/06/30 17:37:43

  Modified:    src/java/org/apache/ojb/broker/core
                        PersistenceBrokerImpl.java
  Log:
  enhanced exception message for easier debugging
  
  Revision  Changes    Path
  1.19      +7 -2      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- PersistenceBrokerImpl.java	30 Jun 2003 18:32:50 -0000	1.18
  +++ PersistenceBrokerImpl.java	1 Jul 2003 00:37:43 -0000	1.19
  @@ -1900,7 +1900,12 @@
   			pkValues = serviceBrokerHelper().getKeyValues(cld, obj);
   			if (!assertValidPkFields(cld.getPkFields(), pkValues))
   			{
  -				throw new PersistenceBrokerException("assertValidPkFields failed !");
  +				String append = " on insert";
  +				if (insert)
  +					append = " on insert";
  +				else
  +					append = " on update";
  +				throw new PersistenceBrokerException("assertValidPkFields failed for Object of type:
" + cld.getClassNameOfObject() + append);
   			}
   		}
   		else
  
  
  

Mime
View raw message