db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r550721 - in /db/derby/code/branches/10.3/java: engine/org/apache/derby/impl/load/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/j9_foundation/
Date Tue, 26 Jun 2007 07:55:25 GMT
Author: kahatlen
Date: Tue Jun 26 00:55:24 2007
New Revision: 550721

URL: http://svn.apache.org/viewvc?view=rev&rev=550721
Log:
DERBY-2858: Export exceptions swallow useful information

Merged fix from trunk.

Modified:
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/Export.java
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/LoadError.java
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/iepnegativetests_ES.out

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/Export.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/Export.java?view=diff&rev=550721&r1=550720&r2=550721
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/Export.java (original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/Export.java Tue Jun
26 00:55:24 2007
@@ -54,7 +54,7 @@
 				doAllTheWork();
 			} catch (IOException iex) {
 				//in case of ioexception, catch it and throw it as our own exception
-				throw LoadError.errorWritingData();
+				throw LoadError.errorWritingData(iex);
 			}
 		} catch (Exception ex) {
 			throw LoadError.unexpectedError(ex);

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/LoadError.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/LoadError.java?view=diff&rev=550721&r1=550720&r2=550721
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/LoadError.java (original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/load/LoadError.java Tue
Jun 26 00:55:24 2007
@@ -21,6 +21,7 @@
 
 package org.apache.derby.impl.load;
 
+import java.io.IOException;
 import java.sql.SQLException;
 import org.apache.derby.iapi.error.ExceptionSeverity;
 import org.apache.derby.iapi.reference.SQLState;
@@ -153,9 +154,9 @@
 	/**
 	   Raised if, got IOException while writing data to the file.
 	*/
-	static SQLException errorWritingData() {
+	static SQLException errorWritingData(IOException ioe) {
 		return PublicAPI.wrapStandardException(
-			   StandardException.newException(SQLState.ERROR_WRITING_DATA));
+			StandardException.newException(SQLState.ERROR_WRITING_DATA, ioe));
 	}
 
 

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out?view=diff&rev=550721&r1=550720&r2=550721
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
Tue Jun 26 00:55:24 2007
@@ -46,6 +46,7 @@
 call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'T1' , 'extout/nodir/t1.dat' , 
                                  null, null, null) ;
 ERROR XIE0I: Se ha producido una excepci EnC:>243< n de E/S al grabar datos en el archivo.
+ERROR XJ001: Excepci EnC:>243< n de Java: 'extout/nodir/t1.dat (No such file or directory):
java.io.FileNotFoundException'.
 ij> --export table not found
 call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'NOTABLE' , 'extinout/t1.dat' , 
                                  null, null, null) ;
@@ -65,6 +66,7 @@
 call SYSCS_UTIL.SYSCS_EXPORT_QUERY('select * from iep.t1', 
                                     'extinout/t1.dat' , null, null, 'NOSUCHCODESET') ;
 ERROR XIE0I: Se ha producido una excepci EnC:>243< n de E/S al grabar datos en el archivo.
+ERROR XJ001: Excepci EnC:>243< n de Java: 'NOSUCHCODESET: java.io.UnsupportedEncodingException'.
 ij> call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('XXXX', 'T1' , 'extinout/t1.dat' , 
                                  null, null, null) ;
 ERROR 38000: Se he generado la excepci EnC:>243< n 'java.sql.SQLException: El esquema
'XXXX' no existe.' al evaluar una expresi EnC:>243< n.

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/iepnegativetests_ES.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/iepnegativetests_ES.out?view=diff&rev=550721&r1=550720&r2=550721
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/iepnegativetests_ES.out
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/iepnegativetests_ES.out
Tue Jun 26 00:55:24 2007
@@ -46,6 +46,7 @@
 call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'T1' , 'extout/nodir/t1.dat' , 
                                  null, null, null) ;
 ERROR XIE0I: Se ha producido una excepci EnC:>243< n de E/S al grabar datos en el archivo.
+ERROR XJ001: Excepci EnC:>243< n de Java: 'extout/nodir/t1.dat (No such file or directory):
java.io.FileNotFoundException'.
 ij> --export table not found
 call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'NOTABLE' , 'extinout/t1.dat' , 
                                  null, null, null) ;
@@ -65,6 +66,7 @@
 call SYSCS_UTIL.SYSCS_EXPORT_QUERY('select * from iep.t1', 
                                     'extinout/t1.dat' , null, null, 'NOSUCHCODESET') ;
 ERROR XIE0I: Se ha producido una excepci EnC:>243< n de E/S al grabar datos en el archivo.
+ERROR XJ001: Excepci EnC:>243< n de Java: 'NOSUCHCODESET: java.io.UnsupportedEncodingException'.
 ij> call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('XXXX', 'T1' , 'extinout/t1.dat' , 
                                  null, null, null) ;
 ERROR 38000: Se he generado la excepci EnC:>243< n 'java.sql.SQLException: El esquema
'XXXX' no existe.' al evaluar una expresi EnC:>243< n.



Mime
View raw message