Author: toad
Date: 2006-10-31 19:23:50 +0000 (Tue, 31 Oct 2006)
New Revision: 10765

Modified:
   trunk/freenet/src/freenet/keys/Key.java
Log:
Try to catch the too-big errors.

Modified: trunk/freenet/src/freenet/keys/Key.java
===================================================================
--- trunk/freenet/src/freenet/keys/Key.java     2006-10-31 18:50:50 UTC (rev 
10764)
+++ trunk/freenet/src/freenet/keys/Key.java     2006-10-31 19:23:50 UTC (rev 
10765)
@@ -202,7 +202,7 @@
         if(finalData == null) {
                // Not compressed or not compressible; no size bytes to be 
added.
             if(sourceData.size() > MAX_COMPRESSED_DATA_LENGTH) {
-                throw new CHKEncodeException("Too big");
+                throw new CHKEncodeException("Too big: "+sourceData.size()+" 
should be "+MAX_COMPRESSED_DATA_LENGTH);
             }
                finalData = BucketTools.toByteArray(sourceData);
         }


Reply via email to