empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r822894 - in /incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db: DBReader.java DBRowSet.java
Date Wed, 07 Oct 2009 20:18:14 GMT
Author: doebele
Date: Wed Oct  7 20:18:14 2009
New Revision: 822894

URL: http://svn.apache.org/viewvc?rev=822894&view=rev
Log:
EMPIREDB-56

Modified:
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBReader.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBReader.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBReader.java?rev=822894&r1=822893&r2=822894&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBReader.java (original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBReader.java Wed
Oct  7 20:18:14 2009
@@ -362,17 +362,18 @@
     {
         if (index < 0 || index >= colList.length)
         { // Index out of range
-            log.error("Index out of range: " + index);
+            error(Errors.OutOfRange, index);
             return null;
         }
         try
         { // Get Value from Resultset
+            clearError();
             DataType dataType = colList[index].getDataType();
             return db.driver.getResultValue(rset, index + 1, dataType);
 
         } catch (Exception e)
-        {
-            log.error("getValue exception", e);
+        { // Operation failed
+            error(e);
             return null;
         }
     }

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java?rev=822894&r1=822893&r2=822894&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java (original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java Wed
Oct  7 20:18:14 2009
@@ -433,12 +433,14 @@
                     fields[i] = ObjectUtils.NO_VALUE;
             	}
             	else
-            	{
+            	{   // Get Field value
                     fields[i] = recData.getValue(rdi);
+                    // Check for error
+                    if (fields[i]==null && recData.hasError())
+                        return error(recData);
             	}
-                
             } catch (Exception e)
-            {
+            {   // Unknown exception
                 log.error("initRecord exception: " + e.toString());
                 rec.close();
                 return error(e);



Mime
View raw message