usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [20/52] [abbrv] git commit: Fixes incorrect exception thrown during errors
Date Wed, 03 Sep 2014 22:11:15 GMT
Fixes incorrect exception thrown during errors


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/b0c25987
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/b0c25987
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/b0c25987

Branch: refs/heads/two-dot-o-push-notifications
Commit: b0c25987a35bcdce7885ed331727b200e26affa9
Parents: b2b54bb
Author: Todd Nine <toddnine@apache.org>
Authored: Thu Aug 28 18:28:56 2014 -0600
Committer: Todd Nine <toddnine@apache.org>
Committed: Thu Aug 28 18:28:56 2014 -0600

----------------------------------------------------------------------
 .../exception/WriteUniqueVerifyException.java     | 18 ------------------
 .../mvcc/stage/write/WriteUniqueVerify.java       |  7 ++-----
 2 files changed, 2 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b0c25987/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/exception/WriteUniqueVerifyException.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/exception/WriteUniqueVerifyException.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/exception/WriteUniqueVerifyException.java
index 710c429..64ca777 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/exception/WriteUniqueVerifyException.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/exception/WriteUniqueVerifyException.java
@@ -38,24 +38,6 @@ public class WriteUniqueVerifyException extends CollectionRuntimeException
{
         this.violations = violations;
     }
 
-
-    public WriteUniqueVerifyException( MvccEntity entity, CollectionScope scope,
-            final String message, final Throwable cause ) {
-        super( entity, scope, message, cause );
-    }
-
-
-    public WriteUniqueVerifyException( MvccEntity entity, CollectionScope scope, final Throwable
cause ) {
-        super( entity, scope, cause );
-    }
-
-
-    public WriteUniqueVerifyException( MvccEntity entity, CollectionScope scope,
-            final String message, final Throwable cause, final boolean enableSuppression,
-            final boolean writableStackTrace ) {
-        super( entity, scope, message, cause, enableSuppression, writableStackTrace );
-    }
-
     /**
      * Get map of Fields in violation, keyed by field name.
      */

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b0c25987/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index abec0c9..aa878cb 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -119,9 +119,7 @@ public class WriteUniqueVerify implements
                             mb.execute();
                         }
                         catch ( ConnectionException ex ) {
-                            throw new WriteUniqueVerifyException( 
-                                    mvccEntity, ioevent.getEntityCollection(),
-                                    "Error writing unique value " + field.toString(), ex
);
+                            throw new RuntimeException("Unable to write to cassandra", ex
);
                         }
 
                         // does the database value match what we wrote?
@@ -130,8 +128,7 @@ public class WriteUniqueVerify implements
                             loaded = uniqueValueStrat.load( ioevent.getEntityCollection(),
field );
                         }
                         catch ( ConnectionException ex ) {
-                            throw new WriteUniqueVerifyException( mvccEntity, ioevent.getEntityCollection(),
-                                    "Error verifying write", ex );
+                            throw new RuntimeException("Unable to read from cassandra", ex
);
                         }
 
                         return new FieldUniquenessResult( 


Mime
View raw message