db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r374809 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/SqlException.java client/org/apache/derby/client/am/SqlWarning.java testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/Stream.out
Date Sat, 04 Feb 2006 01:28:19 GMT
Author: davidvc
Date: Fri Feb  3 17:28:14 2006
New Revision: 374809

URL: http://svn.apache.org/viewcvs?rev=374809&view=rev
Log:
DERBY-922: Fix chaining of exceptions so the underlying client
SqlException/SqlWarning context is maintained and is available
for debugging.  

derbynetclientmats passes on JDK 1.4

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/Stream.out

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java?rev=374809&r1=374808&r2=374809&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java Fri Feb 
3 17:28:14 2006
@@ -281,10 +281,10 @@
             getErrorCode());
 
         // If we're in a runtime that supports chained exceptions, set the cause 
-        // of the SQLException.
+        // of the SQLException to be this SqlException.
          if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14 )
         {
-            sqle.initCause(getCause());
+            sqle.initCause(this);
         }
 
         // Set up the nextException chain

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java?rev=374809&r1=374808&r2=374809&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java Fri Feb  3
17:28:14 2006
@@ -97,10 +97,10 @@
             getErrorCode());
 
         // If we're in a runtime that supports chained exceptions, set the cause 
-        // of the SQLException.
+        // of the SQLWarning to be this SqlWarning.
          if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14 )
         {
-            sqlw.initCause(getCause());
+            sqlw.initCause(this);
         }
 
         // Set up the nextException chain

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/Stream.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/Stream.out?rev=374809&r1=374808&r2=374809&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/Stream.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/Stream.out
Fri Feb  3 17:28:14 2006
@@ -2,15 +2,23 @@
 get stream from SMALL_BLOB_TABLE.SMALL_BLOB again ...
 Expected exception may happen.
 java.sql.SQLException: Stream of column value in result cannot be retrieved twice
+Caused by: org.apache.derby.client.am.SqlException: Stream of column value in result cannot
be retrieved twice
+	... 4 more
 get stream from LARGE_BLOB_TABLE.LARGE_BLOB ...
 get stream from LARGE_BLOB_TABLE.LARGE_BLOB again ...
 Expected exception may happen.
 java.sql.SQLException: Stream of column value in result cannot be retrieved twice
+Caused by: org.apache.derby.client.am.SqlException: Stream of column value in result cannot
be retrieved twice
+	... 4 more
 get reader from SMALL_CLOB_TABLE.SMALL_CLOB ...
 get reader from SMALL_CLOB_TABLE.SMALL_CLOBagain ...
 Expected exception may happen.
 java.sql.SQLException: Stream of column value in result cannot be retrieved twice
+Caused by: org.apache.derby.client.am.SqlException: Stream of column value in result cannot
be retrieved twice
+	... 4 more
 get reader from LARGE_CLOB_TABLE.LARGE_CLOB ...
 get reader from LARGE_CLOB_TABLE.LARGE_CLOBagain ...
 Expected exception may happen.
 java.sql.SQLException: Stream of column value in result cannot be retrieved twice
+Caused by: org.apache.derby.client.am.SqlException: Stream of column value in result cannot
be retrieved twice
+	... 4 more



Mime
View raw message