db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1469505 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/store/raw/data/ engine/org/apache/derby/loc/ shared/org/apache/derby/shared/common/reference/
Date Thu, 18 Apr 2013 18:11:16 GMT
Author: mikem
Date: Thu Apr 18 18:11:15 2013
New Revision: 1469505

URL: http://svn.apache.org/r1469505
Log:
DERBY-5886 FILE_CANNOT_REMOVE_FILE exception prints garbage. 

Added new messages to cover cases where no exception was available for
the second argument, and made text of those messages more specific to 
the actual usage.  Fixed the calls in RAFContainer.java to be consistent, and
still use original error.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java?rev=1469505&r1=1469504&r2=1469505&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java
Thu Apr 18 18:11:15 2013
@@ -356,8 +356,8 @@ public class EncryptOrDecryptData implem
                     StorageFile oldFile = getFile(files[i]);
                     if (!privDelete(oldFile)) {
                         throw StandardException.newException(
-                                      SQLState.FILE_CANNOT_REMOVE_FILE,
-                                      oldFile);
+                                  SQLState.FILE_CANNOT_REMOVE_ENCRYPT_FILE,
+                                  oldFile);
                     }
                 }
             }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java?rev=1469505&r1=1469504&r2=1469505&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
Thu Apr 18 18:11:15 2013
@@ -1680,7 +1680,7 @@ class RAFContainer extends FileContainer
                  catch (SecurityException se)
                  {
                      throw StandardException.newException(
-                         SQLState.FILE_CANNOT_REMOVE_FILE, se, file, stub);
+                         SQLState.FILE_CANNOT_REMOVE_FILE, se, file, se.toString());
                  }
              }
 	

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java?rev=1469505&r1=1469504&r2=1469505&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java Thu
Apr 18 18:11:15 2013
@@ -288,12 +288,12 @@ final class RemoveFile implements Servic
             if (fileToGo.isDirectory()) {
                 if (!fileToGo.deleteAll()) {
                     throw StandardException.newException(
-                            SQLState.FILE_CANNOT_REMOVE_FILE, fileToGo);
+                            SQLState.FILE_CANNOT_REMOVE_JAR_FILE, fileToGo);
                 }
             } else {
                 if (!fileToGo.delete()) {
                     throw StandardException.newException(
-                            SQLState.FILE_CANNOT_REMOVE_FILE, fileToGo);
+                            SQLState.FILE_CANNOT_REMOVE_JAR_FILE, fileToGo);
                 }
             }
         }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml?rev=1469505&r1=1469504&r2=1469505&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml Thu Apr 18 18:11:15
2013
@@ -5873,6 +5873,16 @@ ln=lower-case two-letter ISO-639 languag
                 <text>Error encountered while trying to write data to disk during database
recovery.  Check that the database disk is not full. If it is then delete unnecessary files,
and retry connecting to the database.  It is also possible that the file system is read only,
or the disk has failed, or some other problem with the media.  System encountered error while
processing page {0}.</text>
                 <arg>page</arg>
             </msg>
+            <msg>
+                <name>XSDFJ.S</name>
+                <text>Error encountered while trying to remove database file {0}, as
part of encrypting or decrypting database files. Incorrect file or directory ownership or
permissions could cause remove of the file to fail.  Processes not controled by Derby like
backup or virus checkers could also be responsible.</text>
+                <arg>fileName</arg>
+            </msg>
+            <msg>
+                <name>XSDFK.S</name>
+                <text>Error encountered while trying to remove a jar file {0} stored
in the database. Incorrect file or directory ownership or permissions could cause remove of
the file to fail.  Processes not controled by Derby like backup or virus checkers could also
be responsible.</text>
+                <arg>fileName</arg>
+            </msg>
 
         </family>
 

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=1469505&r1=1469504&r2=1469505&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
(original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
Thu Apr 18 18:11:15 2013
@@ -524,6 +524,8 @@ public interface SQLState {
 	String FILE_UNEXPECTED_EXCEPTION                            = "XSDFF.S";
     String BACKUP_FILE_IO_ERROR                                 = "XSDFH.S";
 	String FILE_NEW_PAGE_DURING_RECOVERY                        = "XSDFI.S";
+	String FILE_CANNOT_REMOVE_ENCRYPT_FILE                      = "XSDFJ.S";
+	String FILE_CANNOT_REMOVE_JAR_FILE                          = "XSDFK.S";
 
 	/*
 	** RawStore - Data.FSLDemo transaction exceptions



Mime
View raw message