db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1628331 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
Date Mon, 29 Sep 2014 22:27:13 GMT
Author: mamta
Date: Mon Sep 29 22:27:13 2014
New Revision: 1628331

URL: http://svn.apache.org/r1628331
Log:
DERBY-6722(GenericStatementContext.cleanupOnError() needs protection from later errors during
statement cleanup.

Handle unexpected exceptions while preserving the original exception for debugging purposes.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java?rev=1628331&r1=1628330&r2=1628331&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
Mon Sep 29 22:27:13 2014
@@ -502,6 +502,7 @@ final class GenericStatementContext 
 			}
 		}
 
+		try {
 		/*
 		** If it isn't a StandardException, then assume
 		** session severity.  It is probably an unexpected
@@ -605,6 +606,13 @@ final class GenericStatementContext 
 
 		/* Pop the context */
 		lcc.popStatementContext(this, error);
+		} catch(Exception ex) {
+			//DERBY-6722(GenericStatementContext.cleanupOnError()  
+			//needs protection from later errors during statement 
+			//cleanup
+			ex.initCause(error);
+			throw StandardException.unexpectedUserException(ex);
+		}
 	}
 
 	/**



Mime
View raw message