Author: toad
Date: 2007-06-15 22:03:05 +0000 (Fri, 15 Jun 2007)
New Revision: 13616
Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Don't print the details if it's an OOM or RunRecoveryException (probably caused
by an OOM) and we are trying to shut down.
Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-06-15
21:24:47 UTC (rev 13615)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-06-15
22:03:05 UTC (rev 13616)
@@ -2072,29 +2072,37 @@
if(chkStore != null)
chkStore.close();
} catch (Throwable t) {
- System.err.println("Caught closing
database: "+t);
- t.printStackTrace();
+ if(!(t instanceof RunRecoveryException
|| t instanceof OutOfMemoryError)) {
+ System.err.println("Caught
closing database: "+t);
+ t.printStackTrace();
+ }
}
try {
if(chkDB_accessTime != null)
chkDB_accessTime.close();
} catch (Throwable t) {
- System.err.println("Caught closing
database: "+t);
- t.printStackTrace();
+ if(!(t instanceof RunRecoveryException
|| t instanceof OutOfMemoryError)) {
+ System.err.println("Caught
closing database: "+t);
+ t.printStackTrace();
+ }
}
try {
if(chkDB_blockNum != null)
chkDB_blockNum.close();
} catch (Throwable t) {
- System.err.println("Caught closing
database: "+t);
- t.printStackTrace();
+ if(!(t instanceof RunRecoveryException
|| t instanceof OutOfMemoryError)) {
+ System.err.println("Caught
closing database: "+t);
+ t.printStackTrace();
+ }
}
try {
if(chkDB != null)
chkDB.close();
} catch (Throwable t) {
- System.err.println("Caught closing
database: "+t);
- t.printStackTrace();
+ if(!(t instanceof RunRecoveryException
|| t instanceof OutOfMemoryError)) {
+ System.err.println("Caught
closing database: "+t);
+ t.printStackTrace();
+ }
}
if(logMINOR) Logger.minor(this, "Closing
database finished.");
System.err.println("Closed database");