You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2011/12/08 17:33:06 UTC

svn commit: r1211963 - /incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java

Author: andy
Date: Thu Dec  8 16:33:05 2011
New Revision: 1211963

URL: http://svn.apache.org/viewvc?rev=1211963&view=rev
Log:
Fix exception messages

Modified:
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java?rev=1211963&r1=1211962&r2=1211963&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java (original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileStorage.java Thu Dec  8 16:33:05 2011
@@ -264,7 +264,7 @@ public class ObjectFileStorage implement
         if ( loc >= filesize )
         {
             if ( loc >= filesize+writeBuffer.position() )
-                throw new IllegalArgumentException("ObjectFile.read["+file.getLabel()+"]: Bad read: location="+loc+" >= max="+(filesize+writeBuffer.position())) ;
+                throw new IllegalArgumentException("ObjectFileStorage.read["+file.getLabel()+"]: Bad read: location="+loc+" >= max="+(filesize+writeBuffer.position())) ;
             
             int x = writeBuffer.position() ;
             int y = writeBuffer.limit() ;
@@ -285,12 +285,12 @@ public class ObjectFileStorage implement
         lengthBuffer.clear() ;
         int x = file.read(lengthBuffer, loc) ;
         if ( x != 4 )
-            throw new FileException("ObjectFile.read["+file.getLabel()+"]("+loc+")[filesize="+filesize+"]filesize="+file.size()+"]: Failed to read the length : got "+x+" bytes") ;
+            throw new FileException("ObjectFileStorage.read["+file.getLabel()+"]("+loc+")[filesize="+filesize+"][file.size()="+file.size()+"]: Failed to read the length : got "+x+" bytes") ;
         int len = lengthBuffer.getInt(0) ;
         // Sanity check. 
         if ( len > filesize-(loc+SizeOfInt) )
         {
-            String msg = "ObjectFile.read["+file.getLabel()+"]("+loc+")[filesize="+filesize+"][filesize="+file.size()+"]: Impossibly large object : "+len+" bytes > filesize-(loc+SizeOfInt)="+(filesize-(loc+SizeOfInt)) ;
+            String msg = "ObjectFileStorage.read["+file.getLabel()+"]("+loc+")[filesize="+filesize+"][file.size()="+file.size()+"]: Impossibly large object : "+len+" bytes > filesize-(loc+SizeOfInt)="+(filesize-(loc+SizeOfInt)) ;
             SystemTDB.errlog.error(msg) ;
             throw new FileException(msg) ;
         }
@@ -302,7 +302,7 @@ public class ObjectFileStorage implement
         x = file.read(bb, loc+SizeOfInt) ;
         bb.flip() ;
         if ( x != len )
-            throw new FileException("ObjectFile.read: Failed to read the object ("+len+" bytes) : got "+x+" bytes") ;
+            throw new FileException("ObjectFileStorage.read: Failed to read the object ("+len+" bytes) : got "+x+" bytes") ;
         return bb ;
     }