Author: bombe
Date: 2008-08-28 20:12:17 +0000 (Thu, 28 Aug 2008)
New Revision: 22203

Modified:
   trunk/freenet/src/freenet/support/io/BucketTools.java
Log:
only create a single exception

Modified: trunk/freenet/src/freenet/support/io/BucketTools.java
===================================================================
--- trunk/freenet/src/freenet/support/io/BucketTools.java       2008-08-28 
19:16:13 UTC (rev 22202)
+++ trunk/freenet/src/freenet/support/io/BucketTools.java       2008-08-28 
20:12:17 UTC (rev 22203)
@@ -286,8 +286,9 @@
                                if(bytes <= 0) {
                                        if(truncateLength == Long.MAX_VALUE)
                                                break;
-                                       new IOException().printStackTrace();
-                                       throw new IOException("Could not move 
required quantity of data in copyTo: "+bytes+" (moved "+moved+" of 
"+truncateLength+"): unable to read from "+is);
+                                       IOException ioException = new 
IOException("Could not move required quantity of data in copyTo: "+bytes+" 
(moved "+moved+" of "+truncateLength+"): unable to read from "+is);
+                                       ioException.printStackTrace();
+                                       throw ioException; 
                                }
                                os.write(buf, 0, bytes);
                                moved += bytes;


Reply via email to