empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1150142 - in /incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire: commons/Errors.java db/DBErrors.java db/DBQuery.java
Date Sat, 23 Jul 2011 16:16:49 GMT
Author: doebele
Date: Sat Jul 23 16:16:48 2011
New Revision: 1150142

URL: http://svn.apache.org/viewvc?rev=1150142&view=rev
Log:
EMPIREDB-99 Error definitions removed

Removed:
    incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/commons/Errors.java
    incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/DBErrors.java
Modified:
    incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/DBQuery.java

Modified: incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/DBQuery.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/DBQuery.java?rev=1150142&r1=1150141&r2=1150142&view=diff
==============================================================================
--- incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/DBQuery.java
(original)
+++ incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/DBQuery.java
Sat Jul 23 16:16:48 2011
@@ -28,15 +28,15 @@ import org.apache.empire.commons.ObjectU
 import org.apache.empire.commons.Options;
 import org.apache.empire.data.DataType;
 import org.apache.empire.db.DBCommand.DBCommandParam;
-import org.apache.empire.db.exceptions.NoPrimaryKeyException;
 import org.apache.empire.db.exceptions.InvalidKeyException;
+import org.apache.empire.db.exceptions.NoPrimaryKeyException;
+import org.apache.empire.db.exceptions.QueryNoResultException;
 import org.apache.empire.db.exceptions.RecordNotFoundException;
 import org.apache.empire.db.exceptions.RecordUpdateFailedException;
 import org.apache.empire.db.exceptions.RecordUpdateInvalidException;
 import org.apache.empire.db.expr.compare.DBCompareColExpr;
 import org.apache.empire.db.expr.compare.DBCompareExpr;
 import org.apache.empire.db.expr.join.DBJoinExpr;
-import org.apache.empire.exceptions.EmpireException;
 import org.apache.empire.exceptions.InvalidArgumentException;
 import org.apache.empire.exceptions.ItemNotFoundException;
 import org.apache.empire.exceptions.NotImplementedException;
@@ -376,14 +376,9 @@ public class DBQuery extends DBRowSet
             readRecord(rec, cmd, conn);
             // Set RowSetData
             rec.changeState(DBRecord.REC_VALID, key.clone());
-        } catch (EmpireException e) {
-            // Translate exception
-            if (e.getErrorType()==DBErrors.QueryNoResult)
-                // Record not found
-                throw new RecordNotFoundException(this, key);
-            else
-                // Other error
-                throw e;
+        } catch (QueryNoResultException e) {
+            // Record not found
+            throw new RecordNotFoundException(this, key);
         }
     }
 



Mime
View raw message