db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r385291 - in /db/derby/code/trunk/java/client/org/apache/derby/client/am: ExceptionFormatter.java Sqlca.java
Date Sun, 12 Mar 2006 14:41:53 GMT
Author: kahatlen
Date: Sun Mar 12 06:41:51 2006
New Revision: 385291

URL: http://svn.apache.org/viewcvs?rev=385291&view=rev
Log:
DERBY-1061: SqlException while fetching message results in recursive
calls between SqlException.getSQLException and Sqlca.getJDBCMessage

Don't convert SqlException to SQLException when fetching of error message
in Sqlca.getJDBCMessage() fails.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java?rev=385291&r1=385290&r2=385291&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java Sun
Mar 12 06:41:51 2006
@@ -65,7 +65,7 @@
                         if (!sqlca.messageTextRetrievedContainsTokensOnly_) { // got the
message text.
                             printWriter.println(header + " Message    = " + message);
                         } else { // got only message tokens.
-                            java.sql.SQLException mysteryException = sqlca.exceptionThrownOnStoredProcInvocation_;
+                            SqlException mysteryException = sqlca.exceptionThrownOnStoredProcInvocation_;
                             if (mysteryException != null &&
                                     (mysteryException.getErrorCode() == -440 || mysteryException.getErrorCode()
== -444)) {
                                 printWriter.println(header + " Unable to obtain message text
from server." +

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java?rev=385291&r1=385290&r2=385291&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java Sun Mar 12 06:41:51
2006
@@ -24,7 +24,7 @@
 
 public abstract class Sqlca {
     transient protected Connection connection_;
-    java.sql.SQLException exceptionThrownOnStoredProcInvocation_;
+    SqlException exceptionThrownOnStoredProcInvocation_;
     boolean messageTextRetrievedContainsTokensOnly_ = true;
 
     // data corresponding to SQLCA fields
@@ -262,7 +262,7 @@
                 return getMessage();
             } catch (SqlException e) {
                 // Invocation of stored procedure fails, so we return error message tokens
directly.
-                exceptionThrownOnStoredProcInvocation_ = e.getSQLException();
+                exceptionThrownOnStoredProcInvocation_ = e;
                 chainDeferredExceptionsToAgentOrAsConnectionWarnings((SqlException) e);
                 return getUnformattedMessage();
             }



Mime
View raw message