cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1361357 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/FlattenedArcKey.java
Date Fri, 13 Jul 2012 19:59:05 GMT
Author: aadamchik
Date: Fri Jul 13 19:59:05 2012
New Revision: 1361357

URL: http://svn.apache.org/viewvc?rev=1361357&view=rev
Log:
CAY-1725 NullPointerException from call to removeToManyTarget

do not swallow the underlying exception that confuses the users downstream

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/FlattenedArcKey.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/FlattenedArcKey.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/FlattenedArcKey.java?rev=1361357&r1=1361356&r2=1361357&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/FlattenedArcKey.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/FlattenedArcKey.java
Fri Jul 13 19:59:05 2012
@@ -37,6 +37,7 @@ import org.apache.cayenne.map.DbRelation
 import org.apache.cayenne.map.ObjRelationship;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLTemplate;
+import org.apache.cayenne.util.Util;
 
 /**
  * A holder of flattened relationship modification data.
@@ -203,6 +204,19 @@ final class FlattenedArcKey {
                     public void nextRows(Query query, List dataRows) {
                         result[0] = dataRows;
                     }
+                    
+                    @Override
+                    public void nextQueryException(Query query, Exception ex) {
+                        throw new CayenneRuntimeException("Raising from query exception.",
Util
+                                .unwindException(ex));
+                    }
+
+                    @Override
+                    public void nextGlobalException(Exception ex) {
+                        throw new CayenneRuntimeException(
+                                "Raising from underlyingQueryEngine exception.",
+                                Util.unwindException(ex));
+                    }
                 });
 
         return result[0];



Mime
View raw message