Author: toad
Date: 2007-07-27 18:08:24 +0000 (Fri, 27 Jul 2007)
New Revision: 14391

Modified:
   trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
   trunk/freenet/src/freenet/support/io/PersistentTempFileBucket.java
Log:
logging

Modified: 
trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java  
2007-07-27 18:07:29 UTC (rev 14390)
+++ trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java  
2007-07-27 18:08:24 UTC (rev 14391)
@@ -115,7 +115,7 @@
                        }
                }
                if(dataLength > bucket.size())
-                       throw new CannotCreateFromFieldSetException("Underlying 
bucket is too small: should be "+dataLength+" actually "+bucket.size());
+                       throw new CannotCreateFromFieldSetException("Underlying 
bucket "+bucket+" is too small: should be "+dataLength+" actually 
"+bucket.size());
        }

        public OutputStream getOutputStream() throws IOException {

Modified: trunk/freenet/src/freenet/support/io/PersistentTempFileBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/PersistentTempFileBucket.java  
2007-07-27 18:07:29 UTC (rev 14390)
+++ trunk/freenet/src/freenet/support/io/PersistentTempFileBucket.java  
2007-07-27 18:08:24 UTC (rev 14391)
@@ -26,6 +26,8 @@
                if(tmp == null) throw new CannotCreateFromFieldSetException("No 
filename");
                File file = FileUtil.getCanonicalFile(new File(tmp));
                long id = f.getID(file);
+               if(id == -1)
+                       throw new CannotCreateFromFieldSetException("Cannot 
derive persistent temp file id from filename "+file);
                tmp = fs.get("Length");
                if(tmp == null) throw new CannotCreateFromFieldSetException("No 
length");
                long length;


Reply via email to