Author: toad
Date: 2006-08-15 17:28:16 +0000 (Tue, 15 Aug 2006)
New Revision: 10092

Modified:
   trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
re-doh

Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2006-08-15 
17:26:09 UTC (rev 10091)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2006-08-15 
17:28:16 UTC (rev 10092)
@@ -246,7 +246,7 @@

 //                      Add shutdownhook
                        Runtime.getRuntime().addShutdownHook(new 
ShutdownHook());
-               } catch (Throwable t) {
+               } catch (DatabaseException t) {
                        Logger.error(this, "Caught "+t, t);
                        try {
                                chkDB_accessTime.close();
@@ -263,6 +263,25 @@
                        } catch (DatabaseException e2) {
                                Logger.normal(this, "Ignoring "+e2, e2);
                        }
+                       throw t;
+               } catch (IOException t) {
+                       Logger.error(this, "Caught "+t, t);
+                       try {
+                               chkDB_accessTime.close();
+                       } catch (DatabaseException e2) {
+                               Logger.normal(this, "Ignoring "+e2, e2);
+                       }
+                       try {
+                               chkDB_blockNum.close();
+                       } catch (DatabaseException e2) {
+                               Logger.normal(this, "Ignoring "+e2, e2);
+                       }
+                       try {
+                               chkDB.close();
+                       } catch (DatabaseException e2) {
+                               Logger.normal(this, "Ignoring "+e2, e2);
+                       }
+                       throw t;
                }
        }



Reply via email to