Author: toad
Date: 2007-08-17 13:47:56 +0000 (Fri, 17 Aug 2007)
New Revision: 14745

Modified:
   trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Grep for the error, sometimes it's only in the message string :<<<<
Maybe we should fix it and send a patch in to initCause to the old exception 
rather than copying its string.

Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-08-17 
13:44:11 UTC (rev 14744)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-08-17 
13:47:56 UTC (rev 14745)
@@ -1806,7 +1806,10 @@
                                Logger.error(this, "Corrupt secondary database 
("+getName()+"). Should be cleaned up on restart.");
                                System.err.println("Corrupt secondary database 
("+getName()+"). Should be cleaned up on restart.");
                                
System.exit(freenet.node.NodeInitException.EXIT_DATABASE_REQUIRES_RESTART);
-                       } else if(ex instanceof DbChecksumException || ex 
instanceof RunRecoveryException || ex instanceof LogFileNotFoundException) {
+                       } else if(ex instanceof DbChecksumException || ex 
instanceof RunRecoveryException || ex instanceof LogFileNotFoundException ||
+                                       // UGH! We really shouldn't have to do 
this ... :(
+                                       (msg != null && 
+                                                       
(msg.indexOf("LogFileNotFoundException") >= 0 || 
msg.indexOf("DbChecksumException") >= 0))) {
                                System.err.println("Corrupt database! Will be 
reconstructed on restart");
                                try {
                                        reconstructFile.createNewFile();


Reply via email to